-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gradio {"detail":"Method Not Allowed"} #4591
Comments
Hi @wccccp - what was the code you used "for request the URL using the API"? Thanks! Would help us debug. |
|
Hi @wccccp we can't debug this without a self-contained example with code. Closing for now, but happy to look into it if you provide us a repro |
I got thisi problem too, and I set the show_error=True, then the xxx/run/predict api return: |
Hi @chenzba - if you're using pydantic version 2.0 the demo needs to be running version gradio 3.36.1! |
thanks for answer. My gradio is 3.35.2, which version of pydantic is best. Thanks! |
If you can't upgrade gradio, pin pydantic to version 1 ( |
I had the same issue and pinning pydantic fixed it for me. It's not ideal though, since I never had to specify pydantic in my requirements.txt before. So ideally old Gradio versions should not install pydantic 2. automatically if they're not compatible with it. |
Hi @segments-tobias that's fair -- but unfortunately pydantic 2.* is incompatible with pydantic 1.* and there's no way for us to go back and edit old releases of gradio |
Understood, thanks for the help! |
Describe the bug
gr.Interface(fn=generate_answer, inputs=inputs, outputs=outputs, title=title, description=description, examples=examples).launch(share=True,server_name="172.16.1.88",server_port=7877,)
Have you searched existing issues? 🔎
Reproduction
I wanted to request the URL using the API, but it failed
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: