Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Hugging Face Spaces entry point for RAG Backend.
|
| 3 |
+
This file is used when deploying to Hugging Face Spaces.
|
| 4 |
+
"""
|
| 5 |
+
import os
|
| 6 |
+
import uvicorn
|
| 7 |
+
from app.main import app
|
| 8 |
+
|
| 9 |
+
if __name__ == "__main__":
|
| 10 |
+
# Hugging Face Spaces provides PORT environment variable (defaults to 7860)
|
| 11 |
+
port = int(os.getenv("PORT", 7860))
|
| 12 |
+
uvicorn.run(app, host="0.0.0.0", port=port)
|
| 13 |
+
|