asoria HF staff commited on
Commit
a970ae0
·
verified ·
1 Parent(s): 3f1630b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -14,6 +14,11 @@ HF_TOKEN = os.getenv("HF_TOKEN")
14
  assert HF_TOKEN is not None, "You need to set HF_TOKEN in your environment variables"
15
 
16
  BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
 
 
 
 
 
17
  client = Client(headers=headers)
18
  api = HfApi(token=HF_TOKEN)
19
  pipe = pipeline("text-generation", model="motherduckdb/DuckDB-NSQL-7B-v0.1", device=1)
 
14
  assert HF_TOKEN is not None, "You need to set HF_TOKEN in your environment variables"
15
 
16
  BASE_DATASETS_SERVER_URL = "https://datasets-server.huggingface.co"
17
+ headers = {
18
+ "Accept" : "application/json",
19
+ "Authorization": f"Bearer {HF_TOKEN}",
20
+ "Content-Type": "application/json"
21
+ }
22
  client = Client(headers=headers)
23
  api = HfApi(token=HF_TOKEN)
24
  pipe = pipeline("text-generation", model="motherduckdb/DuckDB-NSQL-7B-v0.1", device=1)