Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -254,10 +254,10 @@ def setup():
|
|
| 254 |
|
| 255 |
tools = tools_local
|
| 256 |
|
| 257 |
-
def gradio_response(user_input):
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
|
| 262 |
# Inicializa o sistema
|
| 263 |
setup()
|
|
@@ -290,6 +290,12 @@ setup()
|
|
| 290 |
# ).launch(share=True)
|
| 291 |
|
| 292 |
# --- 8. Criação da Interface Gradio ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
if __name__ == "__main__":
|
| 294 |
print("Iniciando a interface Gradio...")
|
| 295 |
demo = gr.ChatInterface(
|
|
|
|
| 254 |
|
| 255 |
tools = tools_local
|
| 256 |
|
| 257 |
+
# def gradio_response(user_input):
|
| 258 |
+
# if not tools:
|
| 259 |
+
# return "Agentes ainda não estão prontos. Aguarde o carregamento."
|
| 260 |
+
# return swarm_router(user_input, tools, router_chain, llm)
|
| 261 |
|
| 262 |
# Inicializa o sistema
|
| 263 |
setup()
|
|
|
|
| 290 |
# ).launch(share=True)
|
| 291 |
|
| 292 |
# --- 8. Criação da Interface Gradio ---
|
| 293 |
+
|
| 294 |
+
def gradio_response(user_input, history):
|
| 295 |
+
if not tools:
|
| 296 |
+
return "Agentes ainda não estão prontos. Aguarde o carregamento."
|
| 297 |
+
return swarm_router(user_input, tools, router_chain, llm)
|
| 298 |
+
|
| 299 |
if __name__ == "__main__":
|
| 300 |
print("Iniciando a interface Gradio...")
|
| 301 |
demo = gr.ChatInterface(
|