NCTCMumbai commited on
Commit
8f4bdb0
1 Parent(s): 74fa21f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -152,12 +152,12 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
152
 
153
  api_kind = gr.Radio(choices=["HuggingFace","Gemini"], value="HuggingFace")
154
 
155
- #prompt_html = gr.HTML()
156
- prompt_html = gr.Textbox()
157
  try:
158
  # Turn off interactivity while generating if you click
159
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
160
- bot, [chatbot, api_kind], [chattext, prompt_html])
161
  except Exception as e:
162
  print ('Exception txt btn click ' ,str(e))
163
  # Turn it back on
@@ -165,7 +165,7 @@ with gr.Blocks(theme='WeixuanYuan/Soft_dark') as demo:
165
  try:
166
  # Turn off interactivity while generating if you hit enter
167
  txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
168
- bot, [chatbot, api_kind], [chattext, prompt_html])
169
  except Exception as e:
170
  print ('Exception ' ,str(e))
171
 
 
152
 
153
  api_kind = gr.Radio(choices=["HuggingFace","Gemini"], value="HuggingFace")
154
 
155
+ prompt_html = gr.HTML()
156
+ # prompt_html = gr.Textbox()
157
  try:
158
  # Turn off interactivity while generating if you click
159
  txt_msg = txt_btn.click(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
160
+ bot, [chatbot, api_kind], [chatbot, prompt_html])
161
  except Exception as e:
162
  print ('Exception txt btn click ' ,str(e))
163
  # Turn it back on
 
165
  try:
166
  # Turn off interactivity while generating if you hit enter
167
  txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
168
+ bot, [chatbot, api_kind], [chatbot, prompt_html])
169
  except Exception as e:
170
  print ('Exception ' ,str(e))
171