ttheland commited on
Commit
c8c8a5a
1 Parent(s): f6e063e
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -18,7 +18,18 @@ import markdown
18
  #https://drive.google.com/file/d/1m9C-WMfKRDCmScxTh8JmcoFtymxAqjS3/view?usp=sharing
19
  url = 'https://drive.google.com/uc?id=1m9C-WMfKRDCmScxTh8JmcoFtymxAqjS3'
20
  path_class_names = "./class_names_restnet_leeds_butterfly.pkl"
21
- gdown.download(url, path_class_names, quiet=False)
 
 
 
 
 
 
 
 
 
 
 
22
  #https://drive.google.com/file/d/1qxaWnYwLIwWGrGg9uehG7h2W227SXGKq/view?usp=sharing
23
  url = 'https://drive.google.com/uc?id=1qxaWnYwLIwWGrGg9uehG7h2W227SXGKq'
24
  path_model = "./model_state_restnet_leeds_butterfly.pth"
 
18
  #https://drive.google.com/file/d/1m9C-WMfKRDCmScxTh8JmcoFtymxAqjS3/view?usp=sharing
19
  url = 'https://drive.google.com/uc?id=1m9C-WMfKRDCmScxTh8JmcoFtymxAqjS3'
20
  path_class_names = "./class_names_restnet_leeds_butterfly.pkl"
21
+
22
+ MAX_TRIES = 10
23
+ i = 0
24
+ while(i<MAX_TRIES):
25
+ try:
26
+ gdown.download(url, path_class_names, quiet=False)
27
+ break
28
+ except:
29
+ i++
30
+ pass
31
+
32
+ # gdown.download(url, path_class_names, quiet=False)
33
  #https://drive.google.com/file/d/1qxaWnYwLIwWGrGg9uehG7h2W227SXGKq/view?usp=sharing
34
  url = 'https://drive.google.com/uc?id=1qxaWnYwLIwWGrGg9uehG7h2W227SXGKq'
35
  path_model = "./model_state_restnet_leeds_butterfly.pth"