AGI_Assistant / app.py
Dmitry Beresnev
fix app
043c5d6
raw
history blame contribute delete
704 Bytes
import gradio as gr
import subprocess
import requests
import os
# Start Clawdbot gateway in background
subprocess.Popen([
"clawdbot",
"gateway",
"--port", "7860",
"--vault-path", "/app/vault"
])
def ask_clawdbot(question):
# Call your local Clawdbot API
try:
response = requests.post("http://localhost:7860/ask", json={"query": question})
return response.json().get("answer", "No answer")
except Exception as e:
return f"Error: {e}"
iface = gr.Interface(
fn=ask_clawdbot,
inputs="text",
outputs="text",
title="Clawdbot Demo",
description="Ask questions to your notes!"
)
iface.launch(server_name="0.0.0.0", server_port=7860)