Closed freddyaboulton closed 1 month ago
• | Name | Status | URL |
---|---|---|---|
Spaces | Spaces preview | ||
Website | Website preview | ||
:unicorn: | Changes | Details |
Install Gradio from this PR
pip install https://gradio-builds.s3.amazonaws.com/5433ba625969061948c250473a2daaf134102ed6/gradio-4.31.5-py3-none-any.whl
Install Gradio Python Client from this PR
pip install "gradio-client @ git+https://github.com/gradio-app/gradio@5433ba625969061948c250473a2daaf134102ed6#subdirectory=client/python"
Install Gradio JS Client from this PR
npm install https://gradio-builds.s3.amazonaws.com/5433ba625969061948c250473a2daaf134102ed6/gradio-client-0.19.4.tgz
Package | Version |
---|---|
gradio |
patch |
gradio_client |
patch |
Set orig_name in python client file uploads
Maintainers or the PR author can modify the PR title to modify this entry.
btw @freddyaboulton it seems my CI change has broken the PR previews so i'll get on fixing that
Thanks @hannahblair !
@freddyaboulton I tested this with a modified version of the repro in the original issue and not sure its working with me. Here's what I tried:
import gradio as gr
def img_test(img):
return img
with gr.Blocks() as demo:
image1 = gr.Image(format="png", type="filepath")
btn = gr.Button(value="process")
btn.click(fn=img_test,inputs=[image1],outputs=[image1],api_name="process")
_, url, _ = demo.launch()
from gradio_client import Client, file
client = Client(url)
result = client.predict(
img=file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
api_name="/process"
)
print(result)
I still got a .webp image:
/private/var/folders/kf/ll6fqkys7_s05x4tvb546mdc0000gn/T/gradio/d5fe0b3ad36a18307d3bba4a5c1a0dd1caa9167c/image.webp
@abidlabs should be fixed now! Was an issue with the url case
Thank you @abidlabs !
Description
Closes: #8366
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh