Pratham0100 commited on
Commit
e64a9fd
·
verified ·
1 Parent(s): 57958a9

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,10 +1,12 @@
1
  import sys
2
  import os
 
3
 
4
  # Add src to python path so neural_archaeology module is found
5
  sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "src")))
6
 
7
  from backend.main import app
8
 
9
- # DO NOT call uvicorn.run() here.
10
- # Hugging Face Spaces automatically finds 'app' and launches it correctly.
 
 
1
  import sys
2
  import os
3
+ import uvicorn
4
 
5
  # Add src to python path so neural_archaeology module is found
6
  sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "src")))
7
 
8
  from backend.main import app
9
 
10
+ # Start the uvicorn server directly. The healthcheck on / will now pass!
11
+ if __name__ == "__main__":
12
+ uvicorn.run(app, host="0.0.0.0", port=7860)