vincentmin commited on
Commit
757e2a3
1 Parent(s): 437467e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -54,7 +54,7 @@ def get_stream(string: str):
54
  return enumerate(iter(string.split(" ")))
55
 
56
  def parameter_accordion():
57
- with gr.Accordion("Parameters", open=True):
58
  model = gr.Radio(
59
  choices = MODELS,
60
  value = MODELS[0],
@@ -159,8 +159,9 @@ def chat():
159
  temperature=temperature,
160
  top_p=top_p,
161
  )
 
162
  for stop in STOP_SEQ:
163
- model_output = model_output[len(prompt):].split(stop)[0]
164
  chat_history = chat_history + [[message, model_output]]
165
  print(f"User: {message}")
166
  print(f"{bot_name}: {model_output}")
 
54
  return enumerate(iter(string.split(" ")))
55
 
56
  def parameter_accordion():
57
+ with gr.Accordion("Parameters", open=False):
58
  model = gr.Radio(
59
  choices = MODELS,
60
  value = MODELS[0],
 
159
  temperature=temperature,
160
  top_p=top_p,
161
  )
162
+ model_output = model_output[len(prompt):]
163
  for stop in STOP_SEQ:
164
+ model_output = model_output.split(stop)[0]
165
  chat_history = chat_history + [[message, model_output]]
166
  print(f"User: {message}")
167
  print(f"{bot_name}: {model_output}")