Andrey Moskalenko
commited on
Commit
•
c94270d
1
Parent(s):
4a6ad68
Update app.py
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ lang = detect(concated_text)
|
|
41 |
st.markdown(f"### Language detection")
|
42 |
|
43 |
if lang == 'ru':
|
|
|
44 |
with st.spinner('Waiting for translation'):
|
45 |
-
st.markdown(f"The language of this article is {lang.upper()} so we translated it!")
|
46 |
input_ids = tokenizer_translator.encode(concated_text,
|
47 |
return_tensors="pt", max_length=512, truncation=True)
|
48 |
outputs = model_translator.generate(input_ids)
|
|
|
41 |
st.markdown(f"### Language detection")
|
42 |
|
43 |
if lang == 'ru':
|
44 |
+
st.markdown(f"The language of this article is {lang.upper()} so we translated it!")
|
45 |
with st.spinner('Waiting for translation'):
|
|
|
46 |
input_ids = tokenizer_translator.encode(concated_text,
|
47 |
return_tensors="pt", max_length=512, truncation=True)
|
48 |
outputs = model_translator.generate(input_ids)
|