Commit d50b95b5 authored by AUTOMATIC's avatar AUTOMATIC

fix an issue preventing the program from starting if the user specifies a bad gradio theme

parent 921dc463
......@@ -672,8 +672,8 @@ def reload_gradio_theme(theme_name=None):
else:
try:
gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
except requests.exceptions.ConnectionError:
print("Can't access HuggingFace Hub, falling back to default Gradio theme")
except Exception as e:
errors.display(e, "changing gradio theme")
gradio_theme = gr.themes.Default()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment