bolleman commited on
Commit
e62fa69
·
1 Parent(s): 4958545

Update Gradio API documentation for public apps; specify production endpoint and response details

Browse files
Files changed (1) hide show
  1. gradio-api.md +22 -4
gradio-api.md CHANGED
@@ -47,14 +47,32 @@ event: complete
47
  data: [ ... ]
48
  ```
49
 
50
- ## Example for Public Gradio Apps
51
- For public Spaces, use the `/call/predict` endpoint and adjust the payload as needed:
 
52
 
53
  ```powershell
54
- curl.exe -X POST "https://abidlabs-en2fr.hf.space/call/predict" -H "Content-Type: application/json" -d '@payload.json'
55
  ```
56
 
57
- Then fetch the result as above, replacing the URL and event ID.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  ## Notes
60
  - For Gradio apps with multiple inputs, adjust the `data` array in `payload.json` accordingly.
 
47
  data: [ ... ]
48
  ```
49
 
50
+
51
+ ## Example for Public Gradio Apps (Production)
52
+ For the production Gradio Space, use the following endpoint and adjust the payload as needed:
53
 
54
  ```powershell
55
+ curl.exe -X POST https://boardflare-mcp-client.hf.space/gradio_api/call/predict -s -H "Content-Type: application/json" -d '@payload.json'
56
  ```
57
 
58
+ This returns a JSON response with an `event_id`, e.g.:
59
+
60
+ ```json
61
+ {"event_id":"YOUR_EVENT_ID"}
62
+ ```
63
+
64
+ Then fetch the result with:
65
+
66
+ ```powershell
67
+ curl.exe -N https://boardflare-mcp-client.hf.space/gradio_api/call/predict/YOUR_EVENT_ID
68
+ ```
69
+
70
+ You will see output like:
71
+
72
+ ```
73
+ event: complete
74
+ data: [ ... ]
75
+ ```
76
 
77
  ## Notes
78
  - For Gradio apps with multiple inputs, adjust the `data` array in `payload.json` accordingly.