Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,13 +33,13 @@ def autonomous_agent(input_text):
|
|
33 |
|
34 |
ui = gr.Interface(fn=autonomous_agent, inputs="text", outputs="text", title="Autonomous AI Agent", description="Self-enhancing chatbot with vector memory.")
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
# Mount Gradio app on FastAPI
|
39 |
-
app = mount_gradio_app(app, ui, path='/gradio')
|
40 |
-
|
41 |
init_session_db()
|
42 |
|
|
|
|
|
|
|
43 |
app.add_middleware(
|
44 |
CORSMiddleware,
|
45 |
allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"]
|
|
|
33 |
|
34 |
ui = gr.Interface(fn=autonomous_agent, inputs="text", outputs="text", title="Autonomous AI Agent", description="Self-enhancing chatbot with vector memory.")
|
35 |
|
36 |
+
app = FastAPI()
|
37 |
+
memory = MemoryVectorStore()
|
|
|
|
|
|
|
38 |
init_session_db()
|
39 |
|
40 |
+
from gradio.asgi import ASGIApp
|
41 |
+
app.mount("/gradio", ASGIApp(ui))
|
42 |
+
|
43 |
app.add_middleware(
|
44 |
CORSMiddleware,
|
45 |
allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"]
|