Spaces:
Running
Running
Staticaliza
commited on
Commit
•
df6c8dd
1
Parent(s):
4716681
Update app.py
Browse files
app.py
CHANGED
@@ -64,12 +64,12 @@ def predict(instruction, history, input, preoutput, access_key, model, temperatu
|
|
64 |
)
|
65 |
|
66 |
sy_l, sy_r = SPECIAL_SYMBOLS[0], SPECIAL_SYMBOLS[1]
|
67 |
-
result =
|
68 |
|
69 |
for stop in stops:
|
70 |
-
result =
|
71 |
for symbol in stops:
|
72 |
-
result =
|
73 |
|
74 |
history = history + [[input, result]]
|
75 |
|
|
|
64 |
)
|
65 |
|
66 |
sy_l, sy_r = SPECIAL_SYMBOLS[0], SPECIAL_SYMBOLS[1]
|
67 |
+
result = response.strip()
|
68 |
|
69 |
for stop in stops:
|
70 |
+
result = result.split(stop, 1)[0]
|
71 |
for symbol in stops:
|
72 |
+
result = result.replace(symbol, '')
|
73 |
|
74 |
history = history + [[input, result]]
|
75 |
|