Spaces:
Runtime error
Runtime error
update cache
Browse files- app.py +8 -6
- requirements.txt +1 -1
app.py
CHANGED
@@ -23,7 +23,8 @@ You can try it below \n\n\n"""
|
|
23 |
)
|
24 |
|
25 |
|
26 |
-
|
|
|
27 |
def get_model_infos(multilingual="multilingual"):
|
28 |
api = HfApi()
|
29 |
model_infos = api.list_models(filter=["fill-mask", multilingual], cardData=True)
|
@@ -209,6 +210,9 @@ def set_seed():
|
|
209 |
torch.manual_seed(2023)
|
210 |
|
211 |
|
|
|
|
|
|
|
212 |
with st.sidebar:
|
213 |
|
214 |
st.image("Koya_Presentation-removebg-preview.png")
|
@@ -228,8 +232,8 @@ with st.sidebar:
|
|
228 |
</div>
|
229 |
|
230 |
""",
|
231 |
-
unsafe_allow_html=True
|
232 |
-
|
233 |
url = "https://share.streamlit.io/mesmith027/streamlit_webapps/main/MC_pi/streamlit_app.py"
|
234 |
st.write("check out the paper [here](%s)" % url)
|
235 |
|
@@ -239,9 +243,7 @@ sentence = st.text_input("Please input a sample sentence in the target language"
|
|
239 |
|
240 |
models = get_model_infos(multilingual=None)
|
241 |
selected_models = st.multiselect(
|
242 |
-
"Select of number of models you would like to compare",
|
243 |
-
models["id"],
|
244 |
-
max_selections=3,
|
245 |
)
|
246 |
|
247 |
run = st.button("Get Scores")
|
|
|
23 |
)
|
24 |
|
25 |
|
26 |
+
|
27 |
+
@st.cache_data
|
28 |
def get_model_infos(multilingual="multilingual"):
|
29 |
api = HfApi()
|
30 |
model_infos = api.list_models(filter=["fill-mask", multilingual], cardData=True)
|
|
|
210 |
torch.manual_seed(2023)
|
211 |
|
212 |
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
with st.sidebar:
|
217 |
|
218 |
st.image("Koya_Presentation-removebg-preview.png")
|
|
|
232 |
</div>
|
233 |
|
234 |
""",
|
235 |
+
unsafe_allow_html=True
|
236 |
+
)
|
237 |
url = "https://share.streamlit.io/mesmith027/streamlit_webapps/main/MC_pi/streamlit_app.py"
|
238 |
st.write("check out the paper [here](%s)" % url)
|
239 |
|
|
|
243 |
|
244 |
models = get_model_infos(multilingual=None)
|
245 |
selected_models = st.multiselect(
|
246 |
+
"Select of number of models you would like to compare", models["id"], max_selections=3
|
|
|
|
|
247 |
)
|
248 |
|
249 |
run = st.button("Get Scores")
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
pandas
|
2 |
-
streamlit
|
3 |
numpy
|
4 |
torch
|
5 |
huggingface_hub
|
|
|
1 |
pandas
|
2 |
+
streamlit
|
3 |
numpy
|
4 |
torch
|
5 |
huggingface_hub
|