Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,8 +23,7 @@ def chat_logic(message, image_file, history, mode):
|
|
| 23 |
history.append({"role": "assistant", "content": "❌ Error: API Keys missing."})
|
| 24 |
return history, "", None
|
| 25 |
|
| 26 |
-
# 2. Convert history to simple format for chimera
|
| 27 |
-
# But we'll keep it available for future use
|
| 28 |
simple_history = []
|
| 29 |
for msg in history:
|
| 30 |
if isinstance(msg, dict):
|
|
@@ -53,7 +52,7 @@ def chat_logic(message, image_file, history, mode):
|
|
| 53 |
else:
|
| 54 |
user_msg = message
|
| 55 |
|
| 56 |
-
# 6. Append to History (Dictionary Format for
|
| 57 |
history.append({"role": "user", "content": user_msg})
|
| 58 |
history.append({"role": "assistant", "content": final_response})
|
| 59 |
|
|
@@ -70,12 +69,12 @@ body {
|
|
| 70 |
}
|
| 71 |
"""
|
| 72 |
|
| 73 |
-
with gr.Blocks(title="Axon God Mode"
|
| 74 |
gr.Markdown("# ⚡ AXON: GOD MODE")
|
| 75 |
gr.Markdown("*> Modules: VIM (Vision) | NET (Web) | IGM (Art) | ASM (Code)*")
|
| 76 |
|
| 77 |
with gr.Row():
|
| 78 |
-
chatbot = gr.Chatbot(height=500, elem_id="chatbot"
|
| 79 |
|
| 80 |
with gr.Row():
|
| 81 |
with gr.Column(scale=4):
|
|
@@ -103,4 +102,4 @@ with gr.Blocks(title="Axon God Mode", css=custom_css) as demo:
|
|
| 103 |
)
|
| 104 |
|
| 105 |
if __name__ == "__main__":
|
| 106 |
-
demo.launch(ssr_mode=False)
|
|
|
|
| 23 |
history.append({"role": "assistant", "content": "❌ Error: API Keys missing."})
|
| 24 |
return history, "", None
|
| 25 |
|
| 26 |
+
# 2. Convert history to simple format for chimera
|
|
|
|
| 27 |
simple_history = []
|
| 28 |
for msg in history:
|
| 29 |
if isinstance(msg, dict):
|
|
|
|
| 52 |
else:
|
| 53 |
user_msg = message
|
| 54 |
|
| 55 |
+
# 6. Append to History (Dictionary Format for Gradio 6.x)
|
| 56 |
history.append({"role": "user", "content": user_msg})
|
| 57 |
history.append({"role": "assistant", "content": final_response})
|
| 58 |
|
|
|
|
| 69 |
}
|
| 70 |
"""
|
| 71 |
|
| 72 |
+
with gr.Blocks(title="Axon God Mode") as demo:
|
| 73 |
gr.Markdown("# ⚡ AXON: GOD MODE")
|
| 74 |
gr.Markdown("*> Modules: VIM (Vision) | NET (Web) | IGM (Art) | ASM (Code)*")
|
| 75 |
|
| 76 |
with gr.Row():
|
| 77 |
+
chatbot = gr.Chatbot(height=500, elem_id="chatbot")
|
| 78 |
|
| 79 |
with gr.Row():
|
| 80 |
with gr.Column(scale=4):
|
|
|
|
| 102 |
)
|
| 103 |
|
| 104 |
if __name__ == "__main__":
|
| 105 |
+
demo.launch(ssr_mode=False, css=custom_css)
|