Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,6 +152,7 @@ def chat_interface(message, history, agent_cluster, temperature=0.9, max_new_tok
|
|
| 152 |
active_agents = [agent for agent, is_active in agent_cluster.items() if is_active]
|
| 153 |
response = generate(message, history, active_agents, temperature, max_new_tokens, top_p, repetition_penalty)
|
| 154 |
return (message, response)
|
|
|
|
| 155 |
with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
| 156 |
with gr.Row():
|
| 157 |
for agent_name, agent_data in agent_roles.items():
|
|
@@ -161,7 +162,8 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
| 161 |
|
| 162 |
with gr.Row():
|
| 163 |
gr.ChatInterface(
|
| 164 |
-
chat_interface,
|
|
|
|
| 165 |
additional_inputs=[
|
| 166 |
gr.Slider(
|
| 167 |
label="Temperature",
|
|
@@ -199,7 +201,6 @@ with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
| 199 |
interactive=True,
|
| 200 |
info="Penalize repeated tokens",
|
| 201 |
)
|
| 202 |
-
]
|
| 203 |
-
inputs=[gr.Textbox, gr.Chatbot, get_agent_cluster],
|
| 204 |
)
|
| 205 |
demo.queue().launch(debug=True)
|
|
|
|
| 152 |
active_agents = [agent for agent, is_active in agent_cluster.items() if is_active]
|
| 153 |
response = generate(message, history, active_agents, temperature, max_new_tokens, top_p, repetition_penalty)
|
| 154 |
return (message, response)
|
| 155 |
+
|
| 156 |
with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
| 157 |
with gr.Row():
|
| 158 |
for agent_name, agent_data in agent_roles.items():
|
|
|
|
| 162 |
|
| 163 |
with gr.Row():
|
| 164 |
gr.ChatInterface(
|
| 165 |
+
fn=chat_interface,
|
| 166 |
+
chatbot=gr.Chatbot(), # Asegúrate de crear una instancia de Chatbot si es necesario
|
| 167 |
additional_inputs=[
|
| 168 |
gr.Slider(
|
| 169 |
label="Temperature",
|
|
|
|
| 201 |
interactive=True,
|
| 202 |
info="Penalize repeated tokens",
|
| 203 |
)
|
| 204 |
+
]
|
|
|
|
| 205 |
)
|
| 206 |
demo.queue().launch(debug=True)
|