medtty commited on
Commit
9e294ff
·
1 Parent(s): d75b44a
Files changed (2) hide show
  1. README.md +19 -1
  2. app.py +8 -2
README.md CHANGED
@@ -10,4 +10,22 @@ pinned: false
10
  short_description: hand_gesture_detection_api
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  short_description: hand_gesture_detection_api
11
  ---
12
 
13
+
14
+
15
+ # Hand Gesture Recognition API
16
+
17
+ A hand gesture recognition API built with FastAPI and Gradio, deployed on Hugging Face Spaces.
18
+
19
+ ## Features
20
+ - REST API endpoint for gesture recognition
21
+ - Interactive web UI for testing
22
+ - Recognizes 16 different hand gestures
23
+
24
+ ## API Usage
25
+ Send a POST request with an image file to `/api/predict` to get gesture predictions.
26
+
27
+ ## Web Interface
28
+ Access the web interface directly at the Hugging Face Space URL.
29
+
30
+ ## Deployment
31
+ This application is configured to run on Hugging Face Spaces.
app.py CHANGED
@@ -76,5 +76,11 @@ async def api_predict(file: UploadFile = File(...)):
76
  return predict(image)
77
 
78
  if __name__ == "__main__":
79
- # For Hugging Face Spaces, we need to use specific settings
80
- uvicorn.run(fastapi_app, host="0.0.0.0", port=7860, root_path="")
 
 
 
 
 
 
 
76
  return predict(image)
77
 
78
  if __name__ == "__main__":
79
+ # Modified for Hugging Face Spaces environment
80
+ uvicorn.run(
81
+ fastapi_app,
82
+ host="0.0.0.0",
83
+ port=7860,
84
+ root_path="",
85
+ forwarded_allow_ips="*"
86
+ )