Spaces:
Runtime error
Runtime error
fix buttons
Browse files
app.py
CHANGED
|
@@ -86,8 +86,8 @@ with gr.Blocks() as demo:
|
|
| 86 |
)
|
| 87 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
|
| 92 |
prompt_html = gr.HTML()
|
| 93 |
# Turn off interactivity while generating if you click
|
|
@@ -99,7 +99,7 @@ with gr.Blocks() as demo:
|
|
| 99 |
|
| 100 |
# Turn off interactivity while generating if you hit enter
|
| 101 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
| 102 |
-
bot, [chatbot, api_kind], [chatbot, prompt_html])
|
| 103 |
|
| 104 |
# Turn it back on
|
| 105 |
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|
|
|
|
| 86 |
)
|
| 87 |
txt_btn = gr.Button(value="Submit text", scale=1)
|
| 88 |
|
| 89 |
+
cross_encoder = gr.Checkbox(label="Cross-encoder")
|
| 90 |
+
api_kind = gr.Radio(choices=["HuggingFace", "OpenAI"], value="HuggingFace")
|
| 91 |
|
| 92 |
prompt_html = gr.HTML()
|
| 93 |
# Turn off interactivity while generating if you click
|
|
|
|
| 99 |
|
| 100 |
# Turn off interactivity while generating if you hit enter
|
| 101 |
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
| 102 |
+
bot, [chatbot, api_kind, cross_encoder], [chatbot, prompt_html])
|
| 103 |
|
| 104 |
# Turn it back on
|
| 105 |
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|