ttheland commited on
Commit
24c049f
1 Parent(s): 01ecce5
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -33,7 +33,15 @@ while(i<MAX_TRIES):
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"
36
- gdown.download(url, path_model, quiet=False)
 
 
 
 
 
 
 
 
37
 
38
  # example images
39
  url = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Red_postman_butterfly_%28Heliconius_erato%29.jpg/1599px-Red_postman_butterfly_%28Heliconius_erato%29.jpg"
 
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"
36
+ # gdown.download(url, path_model, quiet=False)
37
+ i = 0
38
+ while(i<MAX_TRIES):
39
+ try:
40
+ gdown.download(url, path_model, quiet=False)
41
+ break
42
+ except:
43
+ pass
44
+ i += 1
45
 
46
  # example images
47
  url = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Red_postman_butterfly_%28Heliconius_erato%29.jpg/1599px-Red_postman_butterfly_%28Heliconius_erato%29.jpg"