File size: 919 Bytes
ad8ba8a
6fa1be7
ad8ba8a
 
6fa1be7
ad8ba8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6fa1be7
 
ad8ba8a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from src.interface.api.routes import router

# Import tools to register them (disabled for Hugging Face Spaces deployment)
# import src.infrastructure.tools.browser
# import src.infrastructure.tools.shell
# import src.infrastructure.tools.file

app = FastAPI(
    title="Gemini Agentic Platform",
    description="Intelligent conversation agent system based on Gemini 3",
    version="1.0.0"
)

# CORS middleware
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

# Include routers
app.include_router(router, prefix="/api/v1")

@app.get("/")
def root():
    return {"message": "Gemini Agentic Platform is running", "docs_url": "/docs"}

if __name__ == "__main__":
    uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)