mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
522daf787a
* Update `async_save_url_to_cache` to work on Wasm * Refactoring `save_url_to_cache` * add changeset * Fix * Use pyodide.http as a custom transport of httpx * Use urllib3 as a custom transport of httpx to make sync http requests * Add an E2E test case to detect the bugs on remote resource caching * add changeset * Add image_remote_url E2E test * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
20 lines
374 B
Python
20 lines
374 B
Python
import gradio as gr
|
|
|
|
|
|
def fn(im):
|
|
return im, "https://picsum.photos/400/300"
|
|
|
|
|
|
demo = gr.Interface(
|
|
fn=fn,
|
|
inputs=gr.Image("https://picsum.photos/300/200", label="InputImage"),
|
|
outputs=[gr.Image(label="Loopback"), gr.Image(label="RemoteImage")],
|
|
examples=[
|
|
["https://picsum.photos/640/480"]
|
|
]
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|