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
I don't think we'll be able to support this use case. What gradio command does is delegate to uvicorn's run-in-reload mode, which imports the app object from your file, so the part in the if __name__ == '__main__' clause will not be run. Also, uvicorn's command line does not support arbitrary extra arguments (docs).
What I suggest you do is load those variables via an environment variable or from a config file!
Describe the bug
When I use argparse in reload mode, it cause errors, for example:
When I launch it using
gradio tmp.py --a 1
, it throwsIt seems that it interpet
--a 1
to "--a.app" . I don't find any description in documentsIs there an existing issue for this?
Reproduction
above code
Screenshot
No response
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: