ariG23498 HF staff commited on
Commit
1f029d6
1 Parent(s): 1046772

chore: adding the image to the text prompt

Browse files
Files changed (1) hide show
  1. app.py +11 -17
app.py CHANGED
@@ -2,21 +2,15 @@ import utils
2
  import streamlit as st
3
  import tensorflow as tf
4
 
5
- def main():
6
- image_url = st.text_input(
7
- label="URL of image",
8
- value="",
9
- placeholder="https://your-favourite-image.png"
10
- )
11
 
12
- # Preprocess the same image but with normlization.
13
- img_url = "https://dl.fbaipublicfiles.com/dino/img.png"
14
- image, preprocessed_image = utils.load_image_from_url(
15
- image_url,
16
- model_type="dino"
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")