GitHub Actions commited on
Commit
175fee8
Β·
1 Parent(s): 40f764e

πŸš€ Auto-deploy from GitHub

Browse files
Files changed (2) hide show
  1. app.py +20 -0
  2. curl_test_commands.md +6 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Entry point for Hugging Face Spaces deployment.
4
+ This file is required by Hugging Face Spaces to know how to start the application.
5
+ """
6
+ import uvicorn
7
+ from app.main import app
8
+
9
+ if __name__ == "__main__":
10
+ # This will be called when running locally with `python app.py`
11
+ uvicorn.run(
12
+ "app.main:app",
13
+ host="0.0.0.0",
14
+ port=7860, # Hugging Face Spaces default port
15
+ reload=False
16
+ )
17
+ else:
18
+ # This is used when imported by Hugging Face Spaces
19
+ # HF Spaces will import `app` from this module
20
+ pass
curl_test_commands.md CHANGED
@@ -104,6 +104,12 @@ curl -X GET "https://ch404-cardserver.hf.space/" -v
104
  ## Debug: Check specific health endpoint - Hugging Face:
105
  curl -X GET "https://ch404-cardserver.hf.space/api/v1/health" -v
106
 
 
 
 
 
 
 
107
  ## Download test - Hugging Face:
108
  curl -X GET "https://ch404-cardserver.hf.space/api/v1/download/YOUR_CARD_ID" \
109
  -H "Accept: image/png" \
 
104
  ## Debug: Check specific health endpoint - Hugging Face:
105
  curl -X GET "https://ch404-cardserver.hf.space/api/v1/health" -v
106
 
107
+ ## Debug: Test different port (7860) - Hugging Face:
108
+ curl -X GET "https://ch404-cardserver.hf.space:7860/api/v1/health" -v
109
+
110
+ ## Debug: Check docs endpoint - Hugging Face:
111
+ curl -X GET "https://ch404-cardserver.hf.space/docs" -v
112
+
113
  ## Download test - Hugging Face:
114
  curl -X GET "https://ch404-cardserver.hf.space/api/v1/download/YOUR_CARD_ID" \
115
  -H "Accept: image/png" \