johann22 commited on
Commit
91705ce
1 Parent(s): e786e50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -145,8 +145,8 @@ with gr.Blocks(css=style) as iface:
145
  with gr.Row():
146
  with gr.Column(scale=1):
147
  chatbot=gr.Chatbot(show_copy_button=True, layout='panel')
148
- with gr.Row()
149
- agent_choice = gr.Radio(choices=["Generate","Describe"])
150
  msg = gr.Textbox()
151
  model_drop=gr.Dropdown(label="Diffusion Models", type="index", choices=[m for m in models], value=models[0])
152
  chat_model_drop=gr.Dropdown(label="Chatbot Models", type="index", choices=[m for m in chat_models.models], value=chat_models.models[0])
@@ -157,7 +157,7 @@ with gr.Blocks(css=style) as iface:
157
  clear = gr.ClearButton([msg, chatbot])
158
  with gr.Column(scale=2):
159
  sumbox=gr.Image(label="Image")
160
- sub_b = submit_b.click(run, [msg,chatbot,model_drop,chat_model_drop],[chatbot,sumbox])
161
- sub_e = msg.submit(run, [msg, chatbot,model_drop,chat_model_drop], [chatbot,sumbox])
162
  stop_b.click(None,None,None, cancels=[sub_b,sub_e])
163
  iface.launch()
 
145
  with gr.Row():
146
  with gr.Column(scale=1):
147
  chatbot=gr.Chatbot(show_copy_button=True, layout='panel')
148
+ with gr.Row():
149
+ agent_choice = gr.Radio(choices=["Generate","Describe"],value="Generate")
150
  msg = gr.Textbox()
151
  model_drop=gr.Dropdown(label="Diffusion Models", type="index", choices=[m for m in models], value=models[0])
152
  chat_model_drop=gr.Dropdown(label="Chatbot Models", type="index", choices=[m for m in chat_models.models], value=chat_models.models[0])
 
157
  clear = gr.ClearButton([msg, chatbot])
158
  with gr.Column(scale=2):
159
  sumbox=gr.Image(label="Image")
160
+ sub_b = submit_b.click(run, [msg,chatbot,model_drop,chat_model_drop,agent_choice],[chatbot,sumbox])
161
+ sub_e = msg.submit(run, [msg, chatbot,model_drop,chat_model_drop,agent_choice], [chatbot,sumbox])
162
  stop_b.click(None,None,None, cancels=[sub_b,sub_e])
163
  iface.launch()