Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,8 @@ maxlength = 500
|
|
18 |
|
19 |
def summarize_and_translate(text):
|
20 |
# check max text length
|
21 |
-
if len(text) >
|
22 |
-
return f"γ¨γ©γΌοΌ{
|
23 |
|
24 |
# Translate from Japanese to English
|
25 |
translated_text_to_en = translator_ja_to_en(text, max_length=maxlength+500)[0]['translation_text']
|
|
|
18 |
|
19 |
def summarize_and_translate(text):
|
20 |
# check max text length
|
21 |
+
if len(text) > maxlength:
|
22 |
+
return f"γ¨γ©γΌοΌ{maxlength}ζεδ»₯ε
γ§ε
₯εγγ¦γγ γγ\nError: The text cannot exceed {maxlength} characters. Please shorten your text."
|
23 |
|
24 |
# Translate from Japanese to English
|
25 |
translated_text_to_en = translator_ja_to_en(text, max_length=maxlength+500)[0]['translation_text']
|