asoria HF staff commited on
Commit
fbc19a1
1 Parent(s): f22f3ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import os
2
  import duckdb
3
  import gradio as gr
4
- from dotenv import load_dotenv
5
  from httpx import Client
6
  from huggingface_hub import HfApi
7
  import pandas as pd
@@ -9,19 +8,14 @@ from gradio_huggingfacehub_search import HuggingfaceHubSearch
9
  import spaces
10
  from llama_cpp import Llama
11
 
12
- load_dotenv()
13
-
14
- HF_TOKEN = os.getenv("HF_TOKEN")
15
- assert HF_TOKEN is not None, "You need to set HF_TOKEN in your environment variables"
16
 
17
  BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
18
  headers = {
19
  "Accept" : "application/json",
20
- "Authorization": f"Bearer {HF_TOKEN}",
21
  "Content-Type": "application/json"
22
  }
23
  client = Client(headers=headers)
24
- api = HfApi(token=HF_TOKEN)
25
  llama = Llama(
26
  model_path="DuckDB-NSQL-7B-v0.1-q8_0.gguf",
27
  n_ctx=2048,
 
1
  import os
2
  import duckdb
3
  import gradio as gr
 
4
  from httpx import Client
5
  from huggingface_hub import HfApi
6
  import pandas as pd
 
8
  import spaces
9
  from llama_cpp import Llama
10
 
 
 
 
 
11
 
12
  BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
13
  headers = {
14
  "Accept" : "application/json",
 
15
  "Content-Type": "application/json"
16
  }
17
  client = Client(headers=headers)
18
+ api = HfApi()
19
  llama = Llama(
20
  model_path="DuckDB-NSQL-7B-v0.1-q8_0.gguf",
21
  n_ctx=2048,