Staticaliza commited on
Commit
df6c8dd
1 Parent(s): 4716681

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = response.split(stop, 1)[0]
71
  for symbol in stops:
72
- result = response.replace(symbol, '')
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