Youngger9765 Claude Happy commited on
Commit
77b7140
·
1 Parent(s): efc08f7

fix: correct uvicorn startup path for HuggingFace Spaces

Browse files

- Run uvicorn from /app directory instead of /app/backend
- This allows proper Python module imports (backend.*)
- Fixes ModuleNotFoundError in HuggingFace deployment

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

Files changed (1) hide show
  1. start.sh +3 -3
start.sh CHANGED
@@ -1,7 +1,7 @@
1
  #!/bin/bash
2
 
3
- # Start FastAPI backend in the background
4
- cd /app/backend && uvicorn main:app --host 0.0.0.0 --port 8000 &
5
 
6
  # Start Next.js frontend on port 7860 (required by Hugging Face)
7
- cd /app/frontend && npm start -- -p 7860
 
1
  #!/bin/bash
2
 
3
+ # Start FastAPI backend in the background (run from /app so imports work)
4
+ cd /app && uvicorn backend.main:app --host 0.0.0.0 --port 8000 &
5
 
6
  # Start Next.js frontend on port 7860 (required by Hugging Face)
7
+ cd /app/frontend && npm start -- -p 7860