Spaces:
Sleeping
Sleeping
Commit
·
8665431
1
Parent(s):
9c2c681
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def get_prompt(message, chat_history, system_prompt):
|
|
21 |
|
22 |
def run(model_id, message, chat_history, system_prompt, max_new_tokens=1024, temperature=0.3, top_p=0.9, top_k=50):
|
23 |
API_URL = "https://api-inference.huggingface.co/models/" + model_id
|
24 |
-
client = Client(API_URL,
|
25 |
generate_kwargs = dict(
|
26 |
max_new_tokens=max_new_tokens,
|
27 |
do_sample=True,
|
|
|
21 |
|
22 |
def run(model_id, message, chat_history, system_prompt, max_new_tokens=1024, temperature=0.3, top_p=0.9, top_k=50):
|
23 |
API_URL = "https://api-inference.huggingface.co/models/" + model_id
|
24 |
+
client = Client(API_URL, headers={'Authorization': f"Bearer {HF_TOKEN}"})
|
25 |
generate_kwargs = dict(
|
26 |
max_new_tokens=max_new_tokens,
|
27 |
do_sample=True,
|