Spaces:
Running
Running
Staticaliza
commited on
Commit
•
57d5907
1
Parent(s):
b7bfe6d
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,6 @@ def predict(instruction, history, input, preinput, access_key, model, temperatur
|
|
38 |
stops = json.loads(stop_seqs)
|
39 |
|
40 |
formatted_input = format(instruction, history, input, preinput)
|
41 |
-
|
42 |
-
history = history + [[input, ""]]
|
43 |
|
44 |
response = CLIENTS[model].text_generation(
|
45 |
formatted_input,
|
@@ -62,10 +60,10 @@ def predict(instruction, history, input, preinput, access_key, model, temperatur
|
|
62 |
match = pattern.search(pre_result)
|
63 |
get_result = match.group(1).strip() if match else ""
|
64 |
|
65 |
-
history = history + [get_result]
|
66 |
|
67 |
print(f"---\nUSER: {input}\nBOT: {get_result}\n---")
|
68 |
-
|
69 |
return (get_result, input, history)
|
70 |
|
71 |
def clear_history():
|
|
|
38 |
stops = json.loads(stop_seqs)
|
39 |
|
40 |
formatted_input = format(instruction, history, input, preinput)
|
|
|
|
|
41 |
|
42 |
response = CLIENTS[model].text_generation(
|
43 |
formatted_input,
|
|
|
60 |
match = pattern.search(pre_result)
|
61 |
get_result = match.group(1).strip() if match else ""
|
62 |
|
63 |
+
history = history + [[input, get_result]]
|
64 |
|
65 |
print(f"---\nUSER: {input}\nBOT: {get_result}\n---")
|
66 |
+
|
67 |
return (get_result, input, history)
|
68 |
|
69 |
def clear_history():
|