Skip to content

Commit d50b95b

Browse files
committed
fix an issue preventing the program from starting if the user specifies a bad gradio theme
1 parent 921dc46 commit d50b95b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/shared.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ def reload_gradio_theme(theme_name=None):
672672
else:
673673
try:
674674
gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
675-
except requests.exceptions.ConnectionError:
676-
print("Can't access HuggingFace Hub, falling back to default Gradio theme")
675+
except Exception as e:
676+
errors.display(e, "changing gradio theme")
677677
gradio_theme = gr.themes.Default()
678678

679679

0 commit comments

Comments
 (0)