alessandro trinca tornidor commited on
Commit
f623930
·
1 Parent(s): acec8bf

[refactor] try avoid using "if __name__ == '__main__'"

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -384,8 +384,7 @@ def get_gradio_interface(
384
  )
385
 
386
 
387
- if __name__ == '__main__':
388
- args = parse_args(sys.argv[1:])
389
- inference_fn = get_inference_model_by_args(args)
390
- io = get_gradio_interface(inference_fn)
391
- app = gr.mount_gradio_app(app, io, path=CUSTOM_GRADIO_PATH)
 
384
  )
385
 
386
 
387
+ args = parse_args(sys.argv[1:])
388
+ inference_fn = get_inference_model_by_args(args)
389
+ io = get_gradio_interface(inference_fn)
390
+ app = gr.mount_gradio_app(app, io, path=CUSTOM_GRADIO_PATH)