@@ -32,7 +32,7 @@ def deserialize_args_from_env():
3232 'api_port' : ('SELFIE_API_PORT' , int ),
3333 'gpu' : ('SELFIE_GPU' , to_bool ),
3434 'reload' : ('SELFIE_RELOAD' , to_bool ),
35- 'verbose ' : ('SELFIE_VERBOSE ' , to_bool ),
35+ 'verbose_logging ' : ('SELFIE_VERBOSE_LOGGING ' , to_bool ),
3636 'headless' : ('SELFIE_HEADLESS' , to_bool ),
3737 'model' : ('SELFIE_MODEL' , str ),
3838 }
@@ -61,7 +61,7 @@ def parse_args():
6161 parser .add_argument ("--api_port" , type = int , default = None , help = "Specify the port to run on" )
6262 parser .add_argument ("--gpu" , default = None , action = "store_true" , help = "Enable GPU support" )
6363 parser .add_argument ("--reload" , action = "store_true" , default = None , help = "Enable hot-reloading" )
64- parser .add_argument ("--verbose " , action = "store_true" , default = None , help = "Enable verbose logging" )
64+ parser .add_argument ("--verbose_logging " , action = "store_true" , default = None , help = "Enable verbose logging" )
6565 parser .add_argument ("--headless" , action = "store_true" , default = None , help = "Run in headless mode (no GUI)" )
6666 parser .add_argument ("--model" , type = str , default = None , help = "Specify the model to use" )
6767 args = parser .parse_args ()
@@ -74,12 +74,15 @@ def get_configured_app(shareable=False):
7474
7575 logger .info (f"Running with args: { args } " )
7676
77- if 'verbose ' in args and args .verbose :
77+ if 'verbose_logging ' in args and args .verbose_logging :
7878 logging .getLogger ("selfie" ).setLevel (level = logging .DEBUG )
7979
8080 logger .info ("Creating app configuration" )
8181 app_config = create_app_config (** vars (args ))
8282
83+ if app_config .verbose_logging :
84+ logging .getLogger ("selfie" ).setLevel (level = logging .DEBUG )
85+
8386 if shareable and app_config .ngrok_enabled :
8487 if app_config .ngrok_authtoken is None :
8588 raise ValueError ("ngrok_authtoken is required to share the API." )
0 commit comments