Spaces:
Runtime error
Runtime error
mehrdad-es
commited on
Commit
•
9485361
1
Parent(s):
a3bdb8c
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def predict(message, history):
|
|
35 |
history_transformer_format = history + [[message, ""]]
|
36 |
stop = StopOnTokens()
|
37 |
|
38 |
-
messages = "".join(["".join(["\n<
|
39 |
for item in history_transformer_format])
|
40 |
|
41 |
model_inputs = tokenizer([messages], return_tensors="pt").to("cuda")
|
|
|
35 |
history_transformer_format = history + [[message, ""]]
|
36 |
stop = StopOnTokens()
|
37 |
|
38 |
+
messages = "".join(["".join(["\n<USER>:"+item[0], "\n<ASSISTANT>:"+item[1]]) #curr_system_message +
|
39 |
for item in history_transformer_format])
|
40 |
|
41 |
model_inputs = tokenizer([messages], return_tensors="pt").to("cuda")
|