Spaces:
Running
Running
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from src.scipeerai.api.routes import router | |
| def create_app() -> FastAPI: | |
| app = FastAPI( | |
| title="SciPeerAI", | |
| description=( | |
| "Automated Scientific Integrity & Peer Review Analysis. " | |
| "Upload paper text and get back a structured integrity report." | |
| ), | |
| version="0.1.0", | |
| ) | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| app.include_router(router) | |
| def health_check(): | |
| return { | |
| "status": "online", | |
| "system": "SciPeerAI", | |
| "version": "0.1.0", | |
| "message": "Scientific Integrity Engine is running" | |
| } | |
| return app |