Closed luoweb closed 11 months ago
Hi @luoweb can you please provide the code for your Gradio app that you are trying to upgrade? Or at least a minimal code example that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example
Hi @luoweb can you please provide the code for your Gradio app that you are trying to upgrade? Or at least a minimal code example that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example
minimal reproduce code as follow, it's normal in 3.45 but stuck in 4.3
defined gallery ui and load with gallery value
with gr.Blocks(
title="TestDemo",
analytics_enabled=False,
css=app_csslib.css,
theme=gr.themes.Monochrome(
primary_hue=gr.themes.colors.red, secondary_hue=gr.themes.colors.pink
),
) as chatapp:
logger.info("Starting ChatApp...")
outputGallery = gr.Gallery(
label="Generated images",
show_label=False,
visible=True,
elem_id="outputGallery",
columns=1,
rows=2,
object_fit="none",#"contain", "cover", "fill", "none", or "scale-down"
height="auto",
scale=1,
min_width=50,
show_download_button=True,
preview=True,
selected_index=1
)
outputGallery.value = ast.literal_eval("[('https://7072-prod-6gml0tp96725fdc6-1302632202.tcb.qcloud.la/homegallery/IMG_3149.PNG?sign=0c8850014a78e3a3725d132b7298da09&t=1697089390','Hash Id: QmZ3NwdttMXQSErMGsWuaikmffdM3hH5py4ryZwRSzDFAv')]")
Hi @luoweb !
I think the issue is setting the value outside of the init. Also, the value is not a valid value for the gallery as the second entry of the list is not an image url or file. The following code works for me ( I had to remove reference to the css file)
with gr.Blocks(
title="TestDemo",
analytics_enabled=False,
theme=gr.themes.Monochrome(
primary_hue=gr.themes.colors.red, secondary_hue=gr.themes.colors.pink
),
) as chatapp:
outputGallery = gr.Gallery(
label="Generated images",
show_label=False,
visible=True,
elem_id="outputGallery",
columns=1,
rows=2,
object_fit="none",
height="auto",
scale=1,
min_width=50,
show_download_button=True,
preview=True,
selected_index=0,
value=['https://7072-prod-6gml0tp96725fdc6-1302632202.tcb.qcloud.la/homegallery/IMG_3149.PNG?sign=0c8850014a78e3a3725d132b7298da09&t=1697089390']
)
chatapp.launch()
Colab link: https://colab.research.google.com/drive/1jmJdiF08LW75ewzI5c_G3pRQr9XXjczl?usp=sharing
Going to close, let us know if you have other issues upgrading.
Describe the bug
upgrade from 3.45 to 4.3, with lots of warning , and frontend stuck in loading status
Have you searched existing issues? 🔎
Reproduction
upgrade from 3.45 to 4.3, with lots of warning , and frontend stuck in loading status
![Uploading image.png…]()
Screenshot
![Uploading image.png…]()
Logs
System Info
Severity
I can work around it