-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix Plotly and Altair plots in 5.0-dev
branch
#9418
Comments
hmm it's a general bug on import gradio as gr
import numpy as np
import plotly.express as px
import pandas as pd
countries = ["USA", "Canada", "Mexico", "UK"]
def fn():
df = pd.DataFrame({
"day": np.arange(0, 100)
})
fig = px.line(df)
return fig
demo = gr.Interface(
fn=fn,
inputs=None,
outputs=gr.Plot()
)
demo.launch() I'm investigating this problem in #9422 |
Reproduce the errorThese are tested on the normal Gradio, not Lite. import gradio as gr
import numpy as np
import pandas as pd
import plotly.express as px
from matplotlib import pyplot as plt
df = pd.DataFrame({
"data": np.random.rand(100)
})
# Matplotlib plot works.
# fig = plt.figure()
# plt.plot(df["data"])
# Plotly plot causes error.
fig = px.line(df)
demo = gr.Interface(
fn=lambda: None,
inputs=gr.Plot(value=fig),
outputs=None,
)
demo.launch() 8e52b6a ( 4c8c6f2: It started to fail. This rev had another SSR error below, which is now fixed, btw.
Current HEAD of
ReasonFound that
I couldn't find where such weird value is set to |
@gradio/lite
in 5.0-dev
branch5.0-dev
branch
No description provided.
The text was updated successfully, but these errors were encountered: