You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched to see if a similar issue already exists.
Is your feature request related to a problem? Please describe.
My Gradio app has many tabs, and each tab has quite a few functionalities.
And I'm increasingly finding that the loading speed is too slow because it loads all tabs every time.
Describe the solution you'd like
Add lazy loading functionality, so that tabs are only loaded when they are needed/accessed.
Additional context
I tried to implement it this way, but it doesn't work:
import gradio as gr
def toggle_render():
return gr.update(render=True)
def lazy_load():
with gr.Blocks() as demo:
with gr.Accordion(render=False) as tabs:
print("this has loaded...")
text1 = gr.Textbox()
# Load event to show the accordion
demo.load(fn=toggle_render, outputs=tabs)
return demo
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
My Gradio app has many tabs, and each tab has quite a few functionalities.
And I'm increasingly finding that the loading speed is too slow because it loads all tabs every time.
Describe the solution you'd like
Add lazy loading functionality, so that tabs are only loaded when they are needed/accessed.
Additional context
I tried to implement it this way, but it doesn't work:
The text was updated successfully, but these errors were encountered: