Staticaliza commited on
Commit
25f48f1
1 Parent(s): f9662b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -47,7 +47,7 @@ def predict(instruction, history, input, preoutput, access_key, model, temperatu
47
  stops = json.loads(stop_seqs)
48
 
49
  formatted_input, formatted_input_base = format(instruction, history, input, preoutput)
50
-
51
  response = CLIENTS[model].text_generation(
52
  formatted_input,
53
  temperature = temperature,
@@ -64,14 +64,13 @@ 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 = response
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
- print(history)
75
  history = history + [[input, result]]
76
  print(history)
77
  print(formatted_input_base + result)
 
47
  stops = json.loads(stop_seqs)
48
 
49
  formatted_input, formatted_input_base = format(instruction, history, input, preoutput)
50
+ print(formatted_input)
51
  response = CLIENTS[model].text_generation(
52
  formatted_input,
53
  temperature = temperature,
 
64
  )
65
 
66
  sy_l, sy_r = SPECIAL_SYMBOLS[0], SPECIAL_SYMBOLS[1]
67
+ result = preoutput + response
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
  print(history)
76
  print(formatted_input_base + result)