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
Files changed (2) hide show
  1. Dockerfile +2 -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 (HF Spaces expects app.py at root)
24
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
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 simply imports and exposes our FastAPI app
 
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