[CHIMERA] Fix Gradio 6.0 incompatibilities (theme, bubble_full_width)
Browse files
app.py
CHANGED
|
@@ -663,7 +663,7 @@ def create_ui(config: AgentZeroConfig, chat_interface: ChatInterface, defense: P
|
|
| 663 |
.agent-zero-header h1 { color: #00ff41; font-family: 'Courier New', monospace; text-shadow: 0 0 10px rgba(0,255,65,0.5); }
|
| 664 |
footer { visibility: hidden; }
|
| 665 |
"""
|
| 666 |
-
|
| 667 |
gr.HTML("""<div class="agent-zero-header">
|
| 668 |
<h1>🛡️ PENTESTING AGENT ZERO</h1>
|
| 669 |
<p style="color: #888; font-family: monospace;">Autonomous AI-Driven Penetration Testing • MCP Server Enabled • Prompt Injection Hardened</p>
|
|
@@ -671,7 +671,7 @@ def create_ui(config: AgentZeroConfig, chat_interface: ChatInterface, defense: P
|
|
| 671 |
</div>""")
|
| 672 |
with gr.Row():
|
| 673 |
with gr.Column(scale=3):
|
| 674 |
-
chatbot = gr.Chatbot(label="Agent Zero Console", height=500,
|
| 675 |
with gr.Row():
|
| 676 |
msg_input = gr.Textbox(label="Pentesting task", placeholder="e.g., 'Scan ports on scanme.nmap.org' or '/help'", scale=8, container=False)
|
| 677 |
send_btn = gr.Button("▶ Execute", variant="primary", scale=1)
|
|
@@ -724,7 +724,7 @@ def main():
|
|
| 724 |
print(f"[+] Defense: {'ACTIVE' if config.prompt_injection_defense else 'DISABLED'}")
|
| 725 |
print(f"[+] Model: {config.agent_model}\n")
|
| 726 |
demo = create_ui(config, chat_interface, defense)
|
| 727 |
-
demo.launch(server_name="0.0.0.0", server_port=7860, mcp_server=config.mcp_enabled, share=False)
|
| 728 |
|
| 729 |
if __name__ == "__main__":
|
| 730 |
main()
|
|
|
|
| 663 |
.agent-zero-header h1 { color: #00ff41; font-family: 'Courier New', monospace; text-shadow: 0 0 10px rgba(0,255,65,0.5); }
|
| 664 |
footer { visibility: hidden; }
|
| 665 |
"""
|
| 666 |
+
with gr.Blocks(title="Pentesting Agent Zero") as demo:
|
| 667 |
gr.HTML("""<div class="agent-zero-header">
|
| 668 |
<h1>🛡️ PENTESTING AGENT ZERO</h1>
|
| 669 |
<p style="color: #888; font-family: monospace;">Autonomous AI-Driven Penetration Testing • MCP Server Enabled • Prompt Injection Hardened</p>
|
|
|
|
| 671 |
</div>""")
|
| 672 |
with gr.Row():
|
| 673 |
with gr.Column(scale=3):
|
| 674 |
+
chatbot = gr.Chatbot(label="Agent Zero Console", height=500, render_markdown=True, avatar_images=(None, "🛡️"))
|
| 675 |
with gr.Row():
|
| 676 |
msg_input = gr.Textbox(label="Pentesting task", placeholder="e.g., 'Scan ports on scanme.nmap.org' or '/help'", scale=8, container=False)
|
| 677 |
send_btn = gr.Button("▶ Execute", variant="primary", scale=1)
|
|
|
|
| 724 |
print(f"[+] Defense: {'ACTIVE' if config.prompt_injection_defense else 'DISABLED'}")
|
| 725 |
print(f"[+] Model: {config.agent_model}\n")
|
| 726 |
demo = create_ui(config, chat_interface, defense)
|
| 727 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, mcp_server=config.mcp_enabled, share=False, theme=gr.themes.Monochrome(primary_hue="green", secondary_hue="gray"), css=css)
|
| 728 |
|
| 729 |
if __name__ == "__main__":
|
| 730 |
main()
|