Spaces:
Runtime error
Runtime error
Commit
·
76fc8a2
1
Parent(s):
c0b6381
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
import transformers
|
8 |
from transformers import RobertaModel, AutoTokenizer
|
9 |
|
10 |
-
|
11 |
def load():
|
12 |
text_encoder = RobertaModel.from_pretrained('SajjadAyoubi/clip-fa-text')
|
13 |
tokenizer = AutoTokenizer.from_pretrained('SajjadAyoubi/clip-fa-text')
|
@@ -75,7 +75,7 @@ def main():
|
|
75 |
unsafe_allow_html=True)
|
76 |
st.sidebar.markdown(description)
|
77 |
_, c, _ = st.columns((1, 3, 1))
|
78 |
-
query = c.text_input('', value='
|
79 |
if len(query) > 0:
|
80 |
results = image_search(query)
|
81 |
st.markdown(get_html(results), unsafe_allow_html=True)
|
|
|
7 |
import transformers
|
8 |
from transformers import RobertaModel, AutoTokenizer
|
9 |
|
10 |
+
@st.cache(hash_funcs={transformers.models.roberta.tokenization_roberta_fast.RobertaTokenizerFast: hash}, suppress_st_warning=True, allow_output_mutation=True)
|
11 |
def load():
|
12 |
text_encoder = RobertaModel.from_pretrained('SajjadAyoubi/clip-fa-text')
|
13 |
tokenizer = AutoTokenizer.from_pretrained('SajjadAyoubi/clip-fa-text')
|
|
|
75 |
unsafe_allow_html=True)
|
76 |
st.sidebar.markdown(description)
|
77 |
_, c, _ = st.columns((1, 3, 1))
|
78 |
+
query = c.text_input('', value='غروب خورشید')
|
79 |
if len(query) > 0:
|
80 |
results = image_search(query)
|
81 |
st.markdown(get_html(results), unsafe_allow_html=True)
|