# Gradio SDK 5.31.0 fully dysfunctional API on Huggingface

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface%2F157328%3E%5C
**Category:** Beginners\
**Created:** [May 30, 2025, 3:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface%2F157328 "2025-05-30T03:29:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xtraa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/xtraa/32/48507_2.png) [@xtraa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fxtraa)%5C
**Post date:** [May 30, 2025, 3:29am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface%2F157328%2F1 "2025-05-30T03:29:30Z")

</div>

Hi, it seems there is a massive problem with gradio and huggy:

Tested, fixed and not working:  
✅ API endpoint diagnostics - tested various URLs  
✅ Gradio versions synchronized - version conflicts found  
✅ Code bugs fixed - detailed undefined, headers undefined  
✅ FastAPI vs. Gradio separated - mount conflicts resolved  
✅ Gradio client tested - space-to-space communication  
✅ React integration - various API formats  
✅ Finally: HuggingFace infrastructure issue identified

results  
All Gradio APIs are listed below:

❌ /api/predict → 404  
❌ /queue/join → 405  
❌ Gradio Client → 405  
❌ Space-to-Space → 404

I know Gradio can be a diva, but this is something that we should definitely have a look at. What am I doing wrong? problem is, when I try to use a stable gradio like 4.44 or 5.8 in requirements.txt, the HF environment always sets it back to the bug machine 5.31.0

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [May 30, 2025, 3:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface%2F157328%2F2 "2025-05-30T03:37:38Z")

</div>

Hmm… I think it’s just a bug. It doesn’t seem to have been reported as an issue, though.

There’s also a bug in the `ImageEditor` component in `5.31.0`, so I reverted back to `5.29.1`…

> <https://github.com/gradio-app/gradio/issues/10989>
>
> \### Describe the bug
> 
> @aliabid94 
> I wanted to address the issue regarding the re…cent changes made to \*\*Fix root on gradio mounted apps setup\*\*, which had been running smoothly for over a year with \*\*FastAPI\*\* and \*\*HAProxy\*\*.
> 
> After reviewing the situation, I’ve decided to revert the recent comment/adjustment, as it seems to have impacted the previously stable configuration. The setup was operating without any issues, so I believe reverting back to the original configuration will restore the expected behavior.
> 
> 
> 
> 
> \### Have you searched existing issues? 🔎
> 
> \- \[x\] I have searched and found no existing issues
> 
> \### Reproduction
> 
> 
> \`\`\` python
> import gradio as gr
> 
> def greet(name):
> return "Hello " + name + "!"
> 
> 
> with gr.Blocks() as demo:
> name = gr.Textbox(label="Name")
> output = gr.Textbox(label="Output Box")
> greet\_btn = gr.Button("Greet")
> greet\_btn.click(fn=greet, inputs=name, outputs=output, api\_name="greet")
> 
> from fastapi import FastAPI
> app = FastAPI()
> 
> gr.mount\_gradio\_app(app, demo, path="/gradio")
> 
> \# run app
> import uvicorn
> uvicorn.run(app, host="0.0.0.0", port=8060, root\_path='/myapp')
> \`\`\`
> 
> 
> \`\`\` bash
> INFO: Loading environment from '.env'
> INFO: Started server process \[29254\]
> INFO: Waiting for application startup.
> INFO: Application startup complete.
> INFO: Uvicorn running on http://0.0.0.0:8060 (Press CTRL+C to quit)
> INFO: 172.22.96.1:56578 - "GET /myapp/myapp/gradio HTTP/1.1" 404 Not Found
> INFO: 172.22.96.1:56582 - "GET /myapp/gradio HTTP/1.1" 307 Temporary Redirect
> INFO: 172.22.96.1:56582 - "GET /myapp/myapp/gradio/ HTTP/1.1" 404 Not Found
> \`\`\`
> 
> ProxySettings
> \`\`\` bash
> acl url\_myapp path\_beg /myapp
> 
> use\_backend myapp if url\_myapp
> 
> backend myapp
> balance roundrobin
> http-request set-header X-Forwarded-Port %\[dst\_port\]
> http-request add-header X-Forwarded-Proto https if { ssl\_fc }
> http-request replace-path /myapp\[/\]?(.\*) /\\1
> http-response replace-header ^Location (.\*) /myapp/\\1
> server node1-myapp 127.0.0.1:8060 check 
> \`\`\`
> 
> \### Screenshot
> 
> \_No response\_
> 
> \### Logs
> 
> \`\`\`shell
> 
> \`\`\`
> 
> \### System Info
> 
> \`\`\`shell
> Linux
> \`\`\`
> 
> \### Severity
> 
> I can work around it

> <https://github.com/gradio-app/gradio/issues/11175>
>
> \### Describe the bug
> 
> It seems that \`gr.api()\` doesn't work if type hints are no…t fully specified in the function. The failure is quite bad with a very long stack trace that doesn't really identify the underlying issue. 
> 
> E.g. test with:
> 
> \`\`\`py
> import gradio as gr
> from typing import Any
> 
> with gr.Blocks() as demo:
> def log(project: str, run: str, metrics: dict) -\> str:
> pass
> 
> gr.api(fn=log, api\_name="log")
> 
> demo.launch()
> \`\`\`
> 
> This fails because \`dict\` needs to be \`dict\[str, Any\]\`. 
> 
> \### Have you searched existing issues? 🔎
> 
> \- \[x\] I have searched and found no existing issues
> 
> \### Reproduction
> 
> See above
> 
> \### Screenshot
> 
> \_No response\_
> 
> \### Logs
> 
> \`\`\`shell
> 
> \`\`\`
> 
> \### System Info
> 
> \`\`\`shell
> 5.29
> \`\`\`
> 
> \### Severity
> 
> I can work around it

---

<div class="post-metadata">

**Author:** ![xtraa](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/xtraa/32/48507_2.png) [@xtraa](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fxtraa)%5C
**Post date:** [May 30, 2025, 3:51am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-sdk-5-31-0-fully-dysfunctional-api-on-huggingface%2F157328%2F3 "2025-05-30T03:51:18Z")

</div>

Thank you for clarification. Problem 2, the FastAPI + Gradio Mount Bug in 5.31.0 hits my problem like 🎯🎯 Okay that’s bad for now but stuff happens and at least I know now that I’m not missing something. Thank you for your helpful resonse! I’ll keep everyone updated in case I find a way to work around it.
