Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ def translate(text_input, openapi_key):
|
|
8 |
openai.api_key = openapi_key
|
9 |
|
10 |
text_list = text_input.split('\n')[8:]
|
|
|
11 |
|
12 |
reply = []
|
13 |
|
@@ -53,9 +54,6 @@ def translate_with_upload(text, file):
|
|
53 |
# ν
μ€νΈμμ λΉ μ€μ μ κ±°ν©λλ€.
|
54 |
text_input = re.sub(r'^\n', '', text_input, flags=re.MULTILINE)
|
55 |
text_input = re.sub(r'\n\n+', '\n\n', text_input)
|
56 |
-
else:
|
57 |
-
# νμΌμ΄ μ
λ‘λλμ§ μμ κ²½μ°, λΉ λ¬Έμμ΄λ‘ μ΄κΈ°νν©λλ€.
|
58 |
-
text_input = ""
|
59 |
|
60 |
return translate(text_input, openapi_key)
|
61 |
|
|
|
8 |
openai.api_key = openapi_key
|
9 |
|
10 |
text_list = text_input.split('\n')[8:]
|
11 |
+
print(text_list)
|
12 |
|
13 |
reply = []
|
14 |
|
|
|
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 |
|