mikeee commited on
Commit
da75503
1 Parent(s): dcea2af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -44,9 +44,10 @@ logger.debug("done load")
44
 
45
  model_path = model.config._dict['model_name_or_path']
46
  logger.debug(f"{model_path=}")
47
- model_size_gb = os.path.getsize(model_path) / (1024 * 1024 * 1024)
48
 
49
- print(f"The model '{model_name}' is taking approximately {model_size_gb:.2f} GB of disk space.")
 
 
50
 
51
  # with gr.Blocks() as demo:
52
  # chatbot = gr.Chatbot()
 
44
 
45
  model_path = model.config._dict['model_name_or_path']
46
  logger.debug(f"{model_path=}")
 
47
 
48
+ model_size_gb = Path(model_path).stat().st_size / 2**30
49
+
50
+ logger.info(f"{model_name=} {model_size_gb=:.2f} GB")
51
 
52
  # with gr.Blocks() as demo:
53
  # chatbot = gr.Chatbot()