Spaces:
Sleeping
Sleeping
chore: adding the image to the text prompt
Browse files
app.py
CHANGED
@@ -2,21 +2,15 @@ import utils
|
|
2 |
import streamlit as st
|
3 |
import tensorflow as tf
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
)
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
st.image(image, caption="Original Image")
|
19 |
-
|
20 |
-
|
21 |
-
if __name__ == "__main__":
|
22 |
-
main()
|
|
|
2 |
import streamlit as st
|
3 |
import tensorflow as tf
|
4 |
|
5 |
+
image_url = st.text_input(
|
6 |
+
label="URL of image",
|
7 |
+
value="https://dl.fbaipublicfiles.com/dino/img.png",
|
8 |
+
placeholder="https://your-favourite-image.png"
|
9 |
+
)
|
|
|
10 |
|
11 |
+
# Preprocess the same image but with normlization.
|
12 |
+
image, preprocessed_image = utils.load_image_from_url(
|
13 |
+
image_url,
|
14 |
+
model_type="dino"
|
15 |
+
)
|
16 |
+
st.image(image, caption="Original Image")
|
|
|
|
|
|
|
|
|
|