jonjhiggins commited on
Commit
784799e
1 Parent(s): 0b19d38

Remove default arguments from Gradio interface launch

Browse files

Fix for app is failing to build with error "TypeError: launch() got an unexpected keyword argument 'cache_examples'"

Looking at https://gradio.app/docs/#interface-launch Hugging Face appears to set both enable_queue and cache_examples to True by default

I don't understand why "cache_examples" is throwing a type error as it still appears as a parameter for launch in the Gradio docs, but this seems to fix it, I tried it out on a fork of this app here: https://huggingface.co/spaces/jonjhiggins/MiDaS

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,4 +60,4 @@ examples = [
60
  ["lions.jpg"]
61
  ]
62
 
63
- gr.Interface(depth, inputs, outputs, title=title, description=description, article=article, examples=examples, analytics_enabled=False).launch(enable_queue=True,cache_examples=True)
 
60
  ["lions.jpg"]
61
  ]
62
 
63
+ gr.Interface(depth, inputs, outputs, title=title, description=description, article=article, examples=examples, analytics_enabled=False).launch()