dai commited on
Commit
3057ef1
·
1 Parent(s): a9fbe7d

reset gen info pane

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -133,7 +133,7 @@ def setup(api_key, model_name, n_blocks, n_bowls):
133
 
134
  info, img = demo_runner.setup(api_key, model_name, n_blocks, n_bowls)
135
  welcome_message = 'How can I help you?'
136
- return info, img, demo_runner, [(None, welcome_message)], None
137
 
138
 
139
  def run(demo_runner, chat_history):
@@ -168,7 +168,8 @@ with gr.Blocks() as demo:
168
  with gr.Row():
169
  inp_api_key = gr.Textbox(value=default_open_ai_key,
170
  label='OpenAI API Key (this is not stored anywhere)', lines=1)
171
- inp_model_name = gr.Dropdown(label='Model Name', choices=['code-davinci-002', 'text-davinci-003', 'text-davinci-002'], value='text-davinci-003')
 
172
  with gr.Row():
173
  inp_n_blocks = gr.Slider(label='Number of Blocks', minimum=0, maximum=5, value=3, step=1)
174
  inp_n_bowls = gr.Slider(label='Number of Bowls', minimum=0, maximum=5, value=3, step=1)
@@ -202,7 +203,7 @@ with gr.Blocks() as demo:
202
  btn_setup.click(
203
  setup,
204
  inputs=[inp_api_key, inp_model_name, inp_n_blocks, inp_n_bowls],
205
- outputs=[info_setup, img_setup, state, chat_box, video_run],
206
  )
207
  btn_add_cot.click(
208
  add_cot,
 
133
 
134
  info, img = demo_runner.setup(api_key, model_name, n_blocks, n_bowls)
135
  welcome_message = 'How can I help you?'
136
+ return info, img, demo_runner, [(None, welcome_message)], None, None
137
 
138
 
139
  def run(demo_runner, chat_history):
 
168
  with gr.Row():
169
  inp_api_key = gr.Textbox(value=default_open_ai_key,
170
  label='OpenAI API Key (this is not stored anywhere)', lines=1)
171
+ inp_model_name = gr.Dropdown(label='Model Name', choices=[
172
+ 'text-davinci-003', 'code-davinci-002', 'text-davinci-002'], value='text-davinci-003')
173
  with gr.Row():
174
  inp_n_blocks = gr.Slider(label='Number of Blocks', minimum=0, maximum=5, value=3, step=1)
175
  inp_n_bowls = gr.Slider(label='Number of Bowls', minimum=0, maximum=5, value=3, step=1)
 
203
  btn_setup.click(
204
  setup,
205
  inputs=[inp_api_key, inp_model_name, inp_n_blocks, inp_n_bowls],
206
+ outputs=[info_setup, img_setup, state, chat_box, video_run, info_run],
207
  )
208
  btn_add_cot.click(
209
  add_cot,