modified import
Browse files
app.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
from main import *
|
|
|
|
|
3 |
from PIL import Image
|
4 |
|
5 |
def display(search_request, search_result) :
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
#put your own image here
|
10 |
-
lorax = Image.open('img/Lorax.jpg')
|
11 |
-
print(lorax.width, lorax.height)
|
12 |
st.image(lorax, width = 250)
|
13 |
|
14 |
st.header("\"" +search_request+ "\" reminds me of :")
|
@@ -22,6 +21,7 @@ def display(search_request, search_result) :
|
|
22 |
return
|
23 |
|
24 |
|
|
|
25 |
|
26 |
st.title('Find my pic!')
|
27 |
|
|
|
1 |
import streamlit as st
|
2 |
from main import *
|
3 |
+
from setup import *
|
4 |
+
|
5 |
from PIL import Image
|
6 |
|
7 |
def display(search_request, search_result) :
|
8 |
|
9 |
+
# lorax = Image.open('img/Lorax.jpg')
|
10 |
+
# print(lorax.width, lorax.height)
|
|
|
|
|
|
|
11 |
st.image(lorax, width = 250)
|
12 |
|
13 |
st.header("\"" +search_request+ "\" reminds me of :")
|
|
|
21 |
return
|
22 |
|
23 |
|
24 |
+
downlad_images()
|
25 |
|
26 |
st.title('Find my pic!')
|
27 |
|
setup.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
from huggingface_hub import hf_hub_url, cached_download
|
2 |
from huggingface_hub.archive import unpack_archive
|
3 |
|
@@ -7,8 +11,6 @@ def downlad_images() :
|
|
7 |
img_dir = 'flickr'
|
8 |
|
9 |
if not os.path.exists(img_dir) :
|
10 |
-
st.write("NEEED to download")
|
11 |
-
|
12 |
# os.makedirs(sample_dir, exist_ok=True)
|
13 |
# # Specify the Google Drive link to the archive file
|
14 |
# archive_url = 'https://drive.google.com/uc?id=14QhofCbby053kWbVeWEBHCxOROQS-bjN'
|
|
|
1 |
+
|
2 |
+
import os
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
from huggingface_hub import hf_hub_url, cached_download
|
6 |
from huggingface_hub.archive import unpack_archive
|
7 |
|
|
|
11 |
img_dir = 'flickr'
|
12 |
|
13 |
if not os.path.exists(img_dir) :
|
|
|
|
|
14 |
# os.makedirs(sample_dir, exist_ok=True)
|
15 |
# # Specify the Google Drive link to the archive file
|
16 |
# archive_url = 'https://drive.google.com/uc?id=14QhofCbby053kWbVeWEBHCxOROQS-bjN'
|