Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from
|
| 3 |
-
from telegram_bot import send, handle_update
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
def
|
| 8 |
-
|
| 9 |
-
return "Ordre envoyé au cerveau Qwen."
|
| 10 |
|
| 11 |
-
|
| 12 |
-
fn=
|
| 13 |
-
inputs="
|
| 14 |
-
outputs="
|
| 15 |
-
title="Agent
|
| 16 |
-
description="Agent
|
| 17 |
)
|
| 18 |
|
| 19 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from agent_zero import AgentZero
|
|
|
|
| 3 |
|
| 4 |
+
# Initialisation Agent Zéro
|
| 5 |
+
agent = AgentZero()
|
| 6 |
|
| 7 |
+
def chat_fn(message):
|
| 8 |
+
return agent.run(message)
|
|
|
|
| 9 |
|
| 10 |
+
demo = gr.Interface(
|
| 11 |
+
fn=chat_fn,
|
| 12 |
+
inputs=gr.Textbox(lines=2, label="Commande"),
|
| 13 |
+
outputs=gr.Textbox(label="Réponse"),
|
| 14 |
+
title="Agent Zero – Qwen Powered",
|
| 15 |
+
description="Agent autonome exécutant les ordres via Qwen 2.5"
|
| 16 |
)
|
| 17 |
|
| 18 |
+
demo.launch()
|