Spaces:
Running
Running
Silvia Terragni
commited on
Commit
β’
bca94f8
1
Parent(s):
ad189b5
added tasks descriptions
Browse files- image2text.py +12 -1
- text2image.py +11 -10
image2text.py
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
def app():
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
def app():
|
4 |
+
st.title("From Image to Text")
|
5 |
+
st.markdown(
|
6 |
+
"""
|
7 |
+
|
8 |
+
### π Ciao!
|
9 |
+
|
10 |
+
Here you can find the captions that are most related to a given image.
|
11 |
+
|
12 |
+
π€ Italian mode on! π€
|
13 |
+
|
14 |
+
"""
|
15 |
+
)
|
text2image.py
CHANGED
@@ -57,20 +57,21 @@ def download_images():
|
|
57 |
def get_image_features():
|
58 |
return jnp.load("static/features/features.npy")
|
59 |
|
60 |
-
def app():
|
61 |
-
|
62 |
-
"""
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
# CLIP Italian Demo
|
67 |
-
## HF-Flax Community Week
|
68 |
|
69 |
-
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
|
|
|
|
|
72 |
|
73 |
-
|
|
|
74 |
|
75 |
query = st.text_input("Insert an italian query text here...")
|
76 |
if query:
|
|
|
57 |
def get_image_features():
|
58 |
return jnp.load("static/features/features.npy")
|
59 |
|
|
|
|
|
|
|
60 |
|
61 |
+
def app():
|
|
|
|
|
|
|
62 |
|
63 |
+
st.title("From Text to Image")
|
64 |
+
st.markdown(
|
65 |
+
"""
|
66 |
+
|
67 |
+
### π Ciao!
|
68 |
|
69 |
+
Here you can search for images in the Unsplash 25k Photos dataset.
|
70 |
+
|
71 |
+
π€ Italian mode on! π€
|
72 |
|
73 |
+
"""
|
74 |
+
)
|
75 |
|
76 |
query = st.text_input("Insert an italian query text here...")
|
77 |
if query:
|