kishoreb4 commited on
Commit
abec730
·
verified ·
1 Parent(s): a0f8422

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -50,8 +50,7 @@ def download_model_from_drive():
50
 
51
  if not os.path.exists(model_path):
52
  # Extract the file ID from the sharing URL
53
- file_id = "1XObpqG8qZ7YUyiRKbpVvxX11yQSK8Y_3"
54
- url = f"https://drive.google.com/uc?id={file_id}"
55
  try:
56
  gdown.download(url, model_path, quiet=False)
57
  st.success("Model downloaded successfully from Google Drive.")
@@ -92,8 +91,8 @@ def load_model():
92
  st.success("Model weights loaded successfully!")
93
  return base_model
94
  except Exception as e:
95
- st.error(f"Error loading weights: {e}")
96
- st.info("Using base pretrained model instead")
97
  return base_model
98
  else:
99
  st.warning("Using base pretrained model since download failed")
 
50
 
51
  if not os.path.exists(model_path):
52
  # Extract the file ID from the sharing URL
53
+ url = "https://drive.google.com/file/d/1XObpqG8qZ7YUyiRKbpVvxX11yQSK8Y_3/view?usp=sharing"
 
54
  try:
55
  gdown.download(url, model_path, quiet=False)
56
  st.success("Model downloaded successfully from Google Drive.")
 
91
  st.success("Model weights loaded successfully!")
92
  return base_model
93
  except Exception as e:
94
+ # st.error(f"Error loading weights: {e}")
95
+ # st.info("Using base pretrained model instead")
96
  return base_model
97
  else:
98
  st.warning("Using base pretrained model since download failed")