Spaces:
Build error
Build error
fix: Fix spontaneous file not found error for cache
Browse files
app.py
CHANGED
@@ -201,7 +201,10 @@ with col2:
|
|
201 |
go_btn = st.button('Visualize π')
|
202 |
|
203 |
with st.spinner(text="Loading brain... π§ "):
|
204 |
-
|
|
|
|
|
|
|
205 |
|
206 |
if go_btn and tw_user != '':
|
207 |
tw_user = tw_user.replace(' ', '')
|
|
|
201 |
go_btn = st.button('Visualize π')
|
202 |
|
203 |
with st.spinner(text="Loading brain... π§ "):
|
204 |
+
try:
|
205 |
+
model = load_model(model_to_use[expected_lang])
|
206 |
+
except FileNotFoundError:
|
207 |
+
model = SentenceTransformer(model_to_use[expected_lang])
|
208 |
|
209 |
if go_btn and tw_user != '':
|
210 |
tw_user = tw_user.replace(' ', '')
|