Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def main():
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
with gr.Tab("ejecucion"):
|
| 43 |
chatbot = gr.Chatbot(elem_id="chatbot", type="messages")
|
| 44 |
-
chat_input = gr.MultimodalTextbox(interactive=True, file_count="multiple", placeholder="Enter message or upload file...", show_label=False
|
| 45 |
with gr.Tab("configuracion"):
|
| 46 |
modelo = gr.Dropdown(label="seleccionar modelo", choices=obtener_modelos())
|
| 47 |
api_key = gr.Textbox(label="API-KEY")
|
|
@@ -49,7 +49,7 @@ def main():
|
|
| 49 |
bot_msg = chat_msg.then(bot, [chatbot, modelo, api_key], chatbot, api_name="bot_response")
|
| 50 |
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
| 51 |
chatbot.like(print_like_dislike, None, None, like_user_message=True)
|
| 52 |
-
demo.launch(share=False, debug=True, show_error=True
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
main()
|
|
|
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
with gr.Tab("ejecucion"):
|
| 43 |
chatbot = gr.Chatbot(elem_id="chatbot", type="messages")
|
| 44 |
+
chat_input = gr.MultimodalTextbox(interactive=True, file_count="multiple", placeholder="Enter message or upload file...", show_label=False)
|
| 45 |
with gr.Tab("configuracion"):
|
| 46 |
modelo = gr.Dropdown(label="seleccionar modelo", choices=obtener_modelos())
|
| 47 |
api_key = gr.Textbox(label="API-KEY")
|
|
|
|
| 49 |
bot_msg = chat_msg.then(bot, [chatbot, modelo, api_key], chatbot, api_name="bot_response")
|
| 50 |
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
|
| 51 |
chatbot.like(print_like_dislike, None, None, like_user_message=True)
|
| 52 |
+
demo.launch(share=False, debug=True, show_error=True)
|
| 53 |
|
| 54 |
if __name__ == "__main__":
|
| 55 |
main()
|