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
When using Examples and setting cache_examples=True, the inputs/outputs load fine when you start app for the first time. However, if you reload the app which reads from the same cache, the outputs no longer load. No examples or methods have changed.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
import gradio as gr
def combine(a, b):
return a + " " + b
with gr.Blocks() as demo:
txt = gr.Textbox(label="Input", lines=2)
txt_2 = gr.Textbox(label="Input 2")
txt_3 = gr.Textbox(value="", label="Output")
btn = gr.Button(value="Submit")
btn.click(combine, inputs=[txt, txt_2], outputs=[txt_3])
gr.Markdown("## Text Examples")
gr.Examples(
[["hi", "Adam"], ["hello", "Eve"]],
[txt, txt_2],
txt_3,
combine,
cache_examples=True,
)
if __name__ == "__main__":
demo.launch()
Screenshot
Output loads fine when initializing cache for the first time
Output no longer loads when reusing the same cache
Logs
Logs when initializing cache for the first time
Caching examples at: '/home/aaronn/git/test/gradio_cached_examples/6'
Caching example 1/2
Caching example 2/2
Caching complete
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
Logs when reusing cache
Using cache from '/home/aaronn/git/test/gradio_cached_examples/6' directory. If method or examples have changed since last caching, delete this folder to clear cache.
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
System Info
gradio==3.41.2
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered:
Describe the bug
When using Examples and setting cache_examples=True, the inputs/outputs load fine when you start app for the first time. However, if you reload the app which reads from the same cache, the outputs no longer load. No examples or methods have changed.
Have you searched existing issues? 🔎
Reproduction
Screenshot
Output loads fine when initializing cache for the first time
Output no longer loads when reusing the same cache
Logs
Logs when initializing cache for the first time
Logs when reusing cache
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: