mawady commited on
Commit
d57d2f2
1 Parent(s): 7b1981e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import tensorflow as tf
2
- from tensorflow.keras.applications.resnet_v2 import ResNet50V2
3
  from tensorflow.keras.preprocessing import image
4
- from tensorflow.keras.applications.resnet_v2 import preprocess_input, decode_predictions
 
5
  import matplotlib.pyplot as plt
6
  from alibi.explainers import IntegratedGradients
7
  from alibi.datasets import load_cats
@@ -26,7 +26,7 @@ url = "https://upload.wikimedia.org/wikipedia/commons/4/43/Cute_dog.jpg"
26
  path_input = "./dog.jpg"
27
  urllib.request.urlretrieve(url, filename=path_input)
28
 
29
- model = ResNet50V2(weights='imagenet')
30
 
31
  n_steps = 50
32
  method = "gausslegendre"
 
1
  import tensorflow as tf
 
2
  from tensorflow.keras.preprocessing import image
3
+ from tensorflow.keras.applications.mobilenet_v2 import MobileNetV2 as keras_model
4
+ from tensorflow.keras.applications.mobilenet_v2 import preprocess_input, decode_predictions
5
  import matplotlib.pyplot as plt
6
  from alibi.explainers import IntegratedGradients
7
  from alibi.datasets import load_cats
 
26
  path_input = "./dog.jpg"
27
  urllib.request.urlretrieve(url, filename=path_input)
28
 
29
+ model = keras_model(weights='imagenet')
30
 
31
  n_steps = 50
32
  method = "gausslegendre"