NeuroOracle / app.py
zxcvb6958
Optimize search with trigram index + precomputed top lists
6e7a2fd
raw
history blame contribute delete
597 Bytes
"""
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()
@app.get("/", include_in_schema=False)
async def root_redirect():
return RedirectResponse(url="/explore")
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=7860, log_level="info")