Spaces:
Sleeping
Sleeping
Commit
·
97b8a2c
1
Parent(s):
9629f82
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,7 @@ def get_prompt(message, chat_history, system_prompt):
|
|
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,
|
|
|
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 |
+
prompt = get_prompt(message, chat_history, system_prompt)
|
26 |
generate_kwargs = dict(
|
27 |
max_new_tokens=max_new_tokens,
|
28 |
do_sample=True,
|