Spaces:
Sleeping
Sleeping
| """ | |
| HuggingFace Spaces entry point. | |
| Imports the real server and runs it on port 7860 (HF default). | |
| Adds a root redirect to /explore since only the KG Explorer is deployed. | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).parent.resolve())) | |
| from core.web.server import create_app | |
| from fastapi.responses import RedirectResponse | |
| import uvicorn | |
| app = create_app() | |
| async def root_redirect(): | |
| return RedirectResponse(url="/explore") | |
| if __name__ == "__main__": | |
| uvicorn.run(app, host="0.0.0.0", port=7860, log_level="info") | |