Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,10 @@ target_folder = "sample/"
|
|
26 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
27 |
zip_ref.extractall(target_folder)
|
28 |
|
29 |
-
|
30 |
-
|
|
|
|
|
31 |
|
32 |
def find_image_disc(prompt, df, top_k):
|
33 |
img_descs = []
|
@@ -41,12 +43,15 @@ def find_image_disc(prompt, df, top_k):
|
|
41 |
|
42 |
return list_images_names, img_descs, list_images_names_vit, img_descs_vit
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
top_k = st.slider('Number of images', 1, 5, 3)
|
46 |
-
df = pd.read_csv('results.csv',
|
47 |
-
sep = '|',
|
48 |
-
names = ['image_name', 'comment_number', 'comment'],
|
49 |
-
header=0)
|
50 |
|
51 |
if txt is not None:
|
52 |
if st.button('Find!'):
|
|
|
26 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
27 |
zip_ref.extractall(target_folder)
|
28 |
|
29 |
+
df = pd.read_csv('results.csv',
|
30 |
+
sep = '|',
|
31 |
+
names = ['image_name', 'comment_number', 'comment'],
|
32 |
+
header=0)
|
33 |
|
34 |
def find_image_disc(prompt, df, top_k):
|
35 |
img_descs = []
|
|
|
43 |
|
44 |
return list_images_names, img_descs, list_images_names_vit, img_descs_vit
|
45 |
|
46 |
+
st.image('image.png')
|
47 |
+
# st.title('Find my pic!')
|
48 |
+
col3, col4 = st.columns(2):
|
49 |
+
with col3:
|
50 |
+
st.image('3bd0e1e6-6b8a-4aa6-828a-c1756c6d38b2.jpeg')
|
51 |
+
with col4:
|
52 |
+
txt = st.text_area("Describe the picture you'd like to see")
|
53 |
+
|
54 |
top_k = st.slider('Number of images', 1, 5, 3)
|
|
|
|
|
|
|
|
|
55 |
|
56 |
if txt is not None:
|
57 |
if st.button('Find!'):
|