Spaces:
Runtime error
Runtime error
disabled the image for time being
Browse files
app.py
CHANGED
|
@@ -115,7 +115,7 @@ st.markdown(
|
|
| 115 |
|
| 116 |
The demo supports "multi language" ;-), feel free to try a prompt on your language. We are also experimenting with
|
| 117 |
the sentence based image search using Wikipedia passages encoded with distillbert, and search the encoded sentence
|
| 118 |
-
in the encoded passages using Facebook's Faiss.
|
| 119 |
"""
|
| 120 |
)
|
| 121 |
|
|
@@ -193,7 +193,8 @@ if st.button("Run"):
|
|
| 193 |
st.write(translation.replace("\n", " \n"))
|
| 194 |
else:
|
| 195 |
st.write(translate(result, lang, "id").replace("\n", " \n"))
|
| 196 |
-
|
|
|
|
| 197 |
image_cat = "https://media.giphy.com/media/vFKqnCdLPNOKc/giphy.gif"
|
| 198 |
image = get_image(translation.replace("\"", "'"))
|
| 199 |
if image is not "":
|
|
@@ -201,6 +202,7 @@ if st.button("Run"):
|
|
| 201 |
else:
|
| 202 |
# display cat image if no image found
|
| 203 |
st.image(image_cat, width=400)
|
|
|
|
| 204 |
|
| 205 |
# Reset state
|
| 206 |
session_state.prompt = None
|
|
|
|
| 115 |
|
| 116 |
The demo supports "multi language" ;-), feel free to try a prompt on your language. We are also experimenting with
|
| 117 |
the sentence based image search using Wikipedia passages encoded with distillbert, and search the encoded sentence
|
| 118 |
+
in the encoded passages using Facebook's Faiss (disabled temporary).
|
| 119 |
"""
|
| 120 |
)
|
| 121 |
|
|
|
|
| 193 |
st.write(translation.replace("\n", " \n"))
|
| 194 |
else:
|
| 195 |
st.write(translate(result, lang, "id").replace("\n", " \n"))
|
| 196 |
+
"""
|
| 197 |
+
# disabled for time being
|
| 198 |
image_cat = "https://media.giphy.com/media/vFKqnCdLPNOKc/giphy.gif"
|
| 199 |
image = get_image(translation.replace("\"", "'"))
|
| 200 |
if image is not "":
|
|
|
|
| 202 |
else:
|
| 203 |
# display cat image if no image found
|
| 204 |
st.image(image_cat, width=400)
|
| 205 |
+
"""
|
| 206 |
|
| 207 |
# Reset state
|
| 208 |
session_state.prompt = None
|