jykoh commited on
Commit
69c0e42
·
1 Parent(s): cefbfeb

Fix txt bug

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -96,13 +96,13 @@ class FromageChatBot:
96
 
97
  with gr.Column(scale=0.7, min_width=0):
98
  image_btn = gr.UploadButton("Image Input", file_types=["image"])
99
- text_input = gr.Textbox(label="Text Input", placeholder="Upload an image [optional]. Then enter a text prompt, and press enter!")
100
  chatbot = gr.Chatbot()
101
  gr_state = gr.State([])
102
  clear_btn = gr.Button("Clear History")
103
 
104
  text_input.submit(self.generate_for_prompt, [text_input, gr_state, ret_scale_factor, max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot])
105
- text_input.submit(lambda :"", None, txt)
106
  image_btn.upload(self.upload_image, [gr_state, image_btn], [gr_state, chatbot])
107
  clear_btn.click(self.reset, [], [gr_state, chatbot])
108
 
 
96
 
97
  with gr.Column(scale=0.7, min_width=0):
98
  image_btn = gr.UploadButton("Image Input", file_types=["image"])
99
+ text_input = gr.Textbox(label="Text Input", lines=1, placeholder="Upload an image above [optional]. Then enter a text prompt, and press enter!")
100
  chatbot = gr.Chatbot()
101
  gr_state = gr.State([])
102
  clear_btn = gr.Button("Clear History")
103
 
104
  text_input.submit(self.generate_for_prompt, [text_input, gr_state, ret_scale_factor, max_ret_images, gr_max_len, gr_temperature], [gr_state, chatbot])
105
+ text_input.submit(lambda :"", None, text_input)
106
  image_btn.upload(self.upload_image, [gr_state, image_btn], [gr_state, chatbot])
107
  clear_btn.click(self.reset, [], [gr_state, chatbot])
108