hayanaka commited on
Commit
367161b
β€’
1 Parent(s): efb718c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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) > max_length:
22
- return f"γ‚¨γƒ©γƒΌοΌš{max_length}ζ–‡ε­—δ»₯内でε…₯εŠ›γ—γ¦γγ γ•γ„\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']
 
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']