Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 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], [
|
| 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], [
|
| 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 |
|