rohit
commited on
Commit
·
d1432ed
1
Parent(s):
7417d8a
Add required app.py file for HF Spaces compatibility
Browse files- Dockerfile +2 -2
- app.py +5 -0
Dockerfile
CHANGED
|
@@ -20,5 +20,5 @@ RUN chmod +x start.sh
|
|
| 20 |
# Expose HF Space port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
-
# Run the FastAPI application
|
| 24 |
-
CMD ["uvicorn", "app
|
|
|
|
| 20 |
# Expose HF Space port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Run the FastAPI application (HF Spaces expects app.py at root)
|
| 24 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Import the FastAPI app from our app module
|
| 2 |
+
from app.main import app
|
| 3 |
+
|
| 4 |
+
# This file is required by Hugging Face Spaces
|
| 5 |
+
# It simply imports and exposes our FastAPI app
|