Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,14 +14,14 @@ import jax
|
|
14 |
st.sidebar.title("CLIP React Demo")
|
15 |
|
16 |
st.sidebar.write("[Model Card](https://huggingface.co/flax-community/clip-reply)")
|
17 |
-
sc= st.sidebar.
|
18 |
|
19 |
sc[0].image("./huggingface_explode3.png",width=150)
|
20 |
sc[1].write(" ")
|
21 |
sc[1].write(" ")
|
22 |
sc[1].markdown("## Researching fun")
|
23 |
|
24 |
-
with st.sidebar.
|
25 |
st.markdown(
|
26 |
"""
|
27 |
Reaction GIFs became an integral part of communication.
|
@@ -39,7 +39,7 @@ file_names.sort()
|
|
39 |
|
40 |
show_val=st.sidebar.button("show all validation set images")
|
41 |
if show_val:
|
42 |
-
cols=st.sidebar.
|
43 |
for i,im in enumerate(file_names):
|
44 |
j=i%col_count
|
45 |
cols[j].image("./jpg/"+im)
|
@@ -99,7 +99,7 @@ def query_with_images(query_images,query_text):
|
|
99 |
# st.write(results)
|
100 |
return zip(*results)
|
101 |
|
102 |
-
q_cols=st.
|
103 |
|
104 |
examples = ["OMG that is disgusting","I'm so scared right now"," I got the job 🎉","Congratulations to all the flax-community week teams","You're awesome","I love you ❤️"]
|
105 |
example_input = q_cols[0].radio("Example Queries :",examples,index=4,help="These are examples I wrote off the top of my head. They don't occur in the dataset")
|
@@ -128,7 +128,7 @@ else:
|
|
128 |
|
129 |
show_gif=st.checkbox("Play GIFs",value=True,help="Will play the original animation. Only first frame is used in training!")
|
130 |
ext = "jpg" if not show_gif else "gif"
|
131 |
-
res_cols=st.
|
132 |
|
133 |
|
134 |
for i,(id_, dist) in enumerate(zip(ids, dists)):
|
|
|
14 |
st.sidebar.title("CLIP React Demo")
|
15 |
|
16 |
st.sidebar.write("[Model Card](https://huggingface.co/flax-community/clip-reply)")
|
17 |
+
sc= st.sidebar.columns(2)
|
18 |
|
19 |
sc[0].image("./huggingface_explode3.png",width=150)
|
20 |
sc[1].write(" ")
|
21 |
sc[1].write(" ")
|
22 |
sc[1].markdown("## Researching fun")
|
23 |
|
24 |
+
with st.sidebar.expander("Motivation",expanded=True):
|
25 |
st.markdown(
|
26 |
"""
|
27 |
Reaction GIFs became an integral part of communication.
|
|
|
39 |
|
40 |
show_val=st.sidebar.button("show all validation set images")
|
41 |
if show_val:
|
42 |
+
cols=st.sidebar.columns(col_count)
|
43 |
for i,im in enumerate(file_names):
|
44 |
j=i%col_count
|
45 |
cols[j].image("./jpg/"+im)
|
|
|
99 |
# st.write(results)
|
100 |
return zip(*results)
|
101 |
|
102 |
+
q_cols=st.columns([5,2,5])
|
103 |
|
104 |
examples = ["OMG that is disgusting","I'm so scared right now"," I got the job 🎉","Congratulations to all the flax-community week teams","You're awesome","I love you ❤️"]
|
105 |
example_input = q_cols[0].radio("Example Queries :",examples,index=4,help="These are examples I wrote off the top of my head. They don't occur in the dataset")
|
|
|
128 |
|
129 |
show_gif=st.checkbox("Play GIFs",value=True,help="Will play the original animation. Only first frame is used in training!")
|
130 |
ext = "jpg" if not show_gif else "gif"
|
131 |
+
res_cols=st.columns(col_count)
|
132 |
|
133 |
|
134 |
for i,(id_, dist) in enumerate(zip(ids, dists)):
|