Hyeonseo commited on
Commit
8127acc
β€’
1 Parent(s): 68bfe6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -54,6 +54,8 @@ def translate_with_upload(text, file):
54
  # ν…μŠ€νŠΈμ—μ„œ 빈 쀄을 μ œκ±°ν•©λ‹ˆλ‹€.
55
  text_input = re.sub(r'^\n', '', text_input, flags=re.MULTILINE)
56
  text_input = re.sub(r'\n\n+', '\n\n', text_input)
 
 
57
 
58
  return translate(text_input, openapi_key)
59
 
 
54
  # ν…μŠ€νŠΈμ—μ„œ 빈 쀄을 μ œκ±°ν•©λ‹ˆλ‹€.
55
  text_input = re.sub(r'^\n', '', text_input, flags=re.MULTILINE)
56
  text_input = re.sub(r'\n\n+', '\n\n', text_input)
57
+ else:
58
+ text_input = ""
59
 
60
  return translate(text_input, openapi_key)
61