File size: 477 Bytes
51718fb
1ae2bef
 
 
51718fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from . import utils
import streamlit as st
import tensorflow as tf

def main():
	image_url = st.text_input(
		label="URL of image",
		value="",
		placeholder="https://your-favourite-image.png"
	)

	# Preprocess the same image but with normlization.
	img_url = "https://dl.fbaipublicfiles.com/dino/img.png"
	image, preprocessed_image = utils.load_image_from_url(
		image_url,
		model_type="dino"
	)
	st.image(image, caption="Original Image")


if __name__ == "__main__":
	main()