Skip to content
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 output UIs with multiple functions that return plots seems to fail #16

Closed
abidlabs opened this issue Jul 1, 2020 · 2 comments
Closed

Comments

@abidlabs
Copy link
Member

abidlabs commented Jul 1, 2020

Something like:

import gradio as gr

r = gr.inputs.Slider(163, 255, label="R")
g = gr.inputs.Slider(119, 255, label="G")
b = gr.inputs.Slider(88, 255, label="B")
low_thresh = gr.inputs.Slider(175/255, label="Lower Threshold")
high_thresh = gr.inputs.Slider(0, 1, label="Upper Threshold")

gr.Interface(fn=[display_image, display_label], inputs=[r, g, b, low_thresh, high_thresh], outputs="plot", live=False).launch(inline=False, share=True)

Where display_image, display_label each returned a plot didn't work. I got blank outputs...

@abidlabs
Copy link
Member Author

abidlabs commented Jul 1, 2020

Upon closer inspection, it seems that perhaps each individual function needs to refresh plt.figure()?

@dawoodkhan82
Copy link
Collaborator

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants