Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -1
src/streamlit_app.py
CHANGED
|
@@ -19,7 +19,8 @@ def get_model() -> tuple[AutoModelForCausalLM, AutoTokenizer]:
|
|
| 19 |
return model, tokenizer
|
| 20 |
|
| 21 |
|
| 22 |
-
model,
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
def translate(src_lang: str, tgt_lang: str, query: str) -> str:
|
|
|
|
| 19 |
return model, tokenizer
|
| 20 |
|
| 21 |
|
| 22 |
+
with st.spinner(text="Loading model, please wait...", show_time=True):
|
| 23 |
+
model, tokenizer = get_model()
|
| 24 |
|
| 25 |
|
| 26 |
def translate(src_lang: str, tgt_lang: str, query: str) -> str:
|