hmb HF Staff commited on
Commit
ed70ece
·
verified ·
1 Parent(s): bc656d2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -1190,16 +1190,6 @@ countries.forEach(c => {{
1190
  countrySelect.value = 'Brazil';
1191
 
1192
  async function callApi(name, params) {{
1193
- // Try direct /run/ first (works locally)
1194
- const directResp = await fetch('/gradio_api/run/' + name, {{
1195
- method: 'POST',
1196
- headers: {{'Content-Type': 'application/json'}},
1197
- body: JSON.stringify({{data: Object.values(params)}})
1198
- }});
1199
- const direct = await directResp.json().catch(() => ({{}}));
1200
- if (direct.data) return direct.data[0];
1201
-
1202
- // Fall back to /call/ + SSE result (HF Spaces queue mode)
1203
  const callResp = await fetch('/gradio_api/call/' + name, {{
1204
  method: 'POST',
1205
  headers: {{'Content-Type': 'application/json'}},
 
1190
  countrySelect.value = 'Brazil';
1191
 
1192
  async function callApi(name, params) {{
 
 
 
 
 
 
 
 
 
 
1193
  const callResp = await fetch('/gradio_api/call/' + name, {{
1194
  method: 'POST',
1195
  headers: {{'Content-Type': 'application/json'}},