Erva Ulusoy commited on
Commit
189e440
·
1 Parent(s): db2175e

fix data download bug

Browse files
Files changed (1) hide show
  1. run_prothgt_app.py +6 -8
run_prothgt_app.py CHANGED
@@ -138,16 +138,14 @@ def generate_prediction_df(protein_ids, model_paths, model_config_paths, go_cate
138
  output = "data/prothgt-kg.pt"
139
 
140
  if not os.path.exists(output):
141
- url = f"https://drive.google.com/uc?id={file_id}"
142
- print(f"Downloading file from {url}...")
 
 
 
 
143
  else:
144
  print(f"File already exists at {output}")
145
- try:
146
- gdown.download(url, output, quiet=False)
147
- print(f"File downloaded to {output}")
148
- except Exception as e:
149
- print(f"Error downloading file: {e}")
150
- raise
151
 
152
  heterodata = torch.load(output)
153
  print(heterodata.edge_types)
 
138
  output = "data/prothgt-kg.pt"
139
 
140
  if not os.path.exists(output):
141
+ try:
142
+ url = f"https://drive.google.com/uc?id={file_id}"
143
+ print(f"Downloading file from {url}...")
144
+ except Exception as e:
145
+ print(f"Error downloading file: {e}")
146
+ raise
147
  else:
148
  print(f"File already exists at {output}")
 
 
 
 
 
 
149
 
150
  heterodata = torch.load(output)
151
  print(heterodata.edge_types)