rohit
commited on
Commit
·
628bcda
1
Parent(s):
d096f0d
Fix ASGI app loading error by renaming app.py to main.py to avoid module conflict
Browse files- Dockerfile +2 -2
- app.py → main.py +1 -1
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", "
|
|
|
|
| 20 |
# Expose HF Space port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Run the FastAPI application
|
| 24 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py → main.py
RENAMED
|
@@ -2,4 +2,4 @@
|
|
| 2 |
from app.main import app
|
| 3 |
|
| 4 |
# This file is required by Hugging Face Spaces
|
| 5 |
-
# It
|
|
|
|
| 2 |
from app.main import app
|
| 3 |
|
| 4 |
# This file is required by Hugging Face Spaces
|
| 5 |
+
# It exposes our FastAPI app at the root level
|