Spaces:
Sleeping
Sleeping
chore: removing cache
Browse files
app.py
CHANGED
@@ -23,17 +23,14 @@ image, preprocessed_image = utils.load_image_from_url(
|
|
23 |
st.image(image, caption="Original Image")
|
24 |
|
25 |
# Load the DINO model
|
26 |
-
|
27 |
-
|
28 |
-
return from_pretrained_keras("probing-vits/vit-dino-base16")
|
29 |
-
|
30 |
-
dino = load_dino()
|
31 |
|
32 |
with st.spinner("Generating the attention scores..."):
|
33 |
# Get the attention scores
|
34 |
_, attention_score_dict = dino.predict(preprocessed_image)
|
35 |
|
36 |
-
with st.spinner("Generating the heat maps..."):
|
37 |
# De-normalize the image for visual clarity.
|
38 |
in1k_mean = tf.constant([0.485 * 255, 0.456 * 255, 0.406 * 255])
|
39 |
in1k_std = tf.constant([0.229 * 255, 0.224 * 255, 0.225 * 255])
|
|
|
23 |
st.image(image, caption="Original Image")
|
24 |
|
25 |
# Load the DINO model
|
26 |
+
with st.spinner("Loading the model..."):
|
27 |
+
dino = from_pretrained_keras("probing-vits/vit-dino-base16")
|
|
|
|
|
|
|
28 |
|
29 |
with st.spinner("Generating the attention scores..."):
|
30 |
# Get the attention scores
|
31 |
_, attention_score_dict = dino.predict(preprocessed_image)
|
32 |
|
33 |
+
with st.spinner("Generating the heat maps... HOLD ON!"):
|
34 |
# De-normalize the image for visual clarity.
|
35 |
in1k_mean = tf.constant([0.485 * 255, 0.456 * 255, 0.406 * 255])
|
36 |
in1k_std = tf.constant([0.229 * 255, 0.224 * 255, 0.225 * 255])
|