Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
d019027
1
Parent(s):
f361376
better error message
Browse files
app.py
CHANGED
@@ -120,5 +120,10 @@ def read_yaml_config():
|
|
120 |
|
121 |
if __name__ == "__main__":
|
122 |
fire.Fire(main)
|
123 |
-
elif __name__ == "app": #
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
if __name__ == "__main__":
|
122 |
fire.Fire(main)
|
123 |
+
elif __name__ == "app": # running in gradio reload mode (`gradio`)
|
124 |
+
try:
|
125 |
+
main()
|
126 |
+
except AssertionError as e:
|
127 |
+
message = str(e)
|
128 |
+
message += "\nNote that command line args are not supported while running in gradio reload mode, config.yaml must be used."
|
129 |
+
raise AssertionError(message) from e
|