Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,10 @@ def summarize_and_translate(text):
|
|
23 |
return f"γ¨γ©γΌοΌ{maxlength}ζεδ»₯ε
γ§ε
₯εγγ¦γγ γγ\nError: The text cannot exceed {maxlength} characters. Please shorten your text."
|
24 |
|
25 |
# Translate from Japanese to English
|
26 |
-
translated_text_to_en = translator_ja_to_en(text, max_length=maxlength+
|
27 |
|
28 |
# Summerize from English to English
|
29 |
-
summary_in_en = summarizer(translated_text_to_en, min_length=5, max_length=
|
30 |
|
31 |
# Translate from English to Japanese
|
32 |
summary_in_ja = translator_en_to_ja(summary_in_en, max_length=100)[0]['translation_text']
|
|
|
23 |
return f"γ¨γ©γΌοΌ{maxlength}ζεδ»₯ε
γ§ε
₯εγγ¦γγ γγ\nError: The text cannot exceed {maxlength} characters. Please shorten your text."
|
24 |
|
25 |
# Translate from Japanese to English
|
26 |
+
translated_text_to_en = translator_ja_to_en(text, max_length=maxlength+200)[0]['translation_text']
|
27 |
|
28 |
# Summerize from English to English
|
29 |
+
summary_in_en = summarizer(translated_text_to_en, min_length=5, max_length=50)[0]['summary_text']
|
30 |
|
31 |
# Translate from English to Japanese
|
32 |
summary_in_ja = translator_en_to_ja(summary_in_en, max_length=100)[0]['translation_text']
|