Spaces:
Runtime error
Runtime error
AFischer1985
commited on
Commit
·
66476a4
1
Parent(s):
3857659
Update run.py
Browse files
run.py
CHANGED
@@ -16,7 +16,7 @@ def response(message, history, model):
|
|
16 |
params={"max_length":500, "return_full_text":False} #, "stream":True
|
17 |
url = f"https://api-inference.huggingface.co/models/{model_id}"
|
18 |
correction=1
|
19 |
-
prompt=f"
|
20 |
print("URL: "+url)
|
21 |
print(params)
|
22 |
print("User: "+message+"\nAI: ")
|
@@ -34,7 +34,7 @@ def response(message, history, model):
|
|
34 |
text=text.rstrip('"}]')
|
35 |
correction=3
|
36 |
response=response+text
|
37 |
-
print(
|
38 |
time.sleep(0.2)
|
39 |
yield response
|
40 |
|
|
|
16 |
params={"max_length":500, "return_full_text":False} #, "stream":True
|
17 |
url = f"https://api-inference.huggingface.co/models/{model_id}"
|
18 |
correction=1
|
19 |
+
prompt=f"[INST] {message} [/INST]" # skipped <s>
|
20 |
print("URL: "+url)
|
21 |
print(params)
|
22 |
print("User: "+message+"\nAI: ")
|
|
|
34 |
text=text.rstrip('"}]')
|
35 |
correction=3
|
36 |
response=response+text
|
37 |
+
print(text)
|
38 |
time.sleep(0.2)
|
39 |
yield response
|
40 |
|