Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -147,8 +147,10 @@ def chat_interface(message, history, agent_cluster, temperature=0.9, max_new_tok
|
|
147 |
code = message[9:-3]
|
148 |
output = run_code(code)
|
149 |
return (message, output)
|
150 |
-
|
151 |
-
|
|
|
|
|
152 |
return (message, response)
|
153 |
|
154 |
with gr.Blocks(theme='ParityError/Interstellar') as demo:
|
|
|
147 |
code = message[9:-3]
|
148 |
output = run_code(code)
|
149 |
return (message, output)
|
150 |
+
else:
|
151 |
+
# User entered a normal message, generate a response
|
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:
|