Update app.py
Browse files
app.py
CHANGED
@@ -45,6 +45,9 @@ def translate_with_upload(text, file):
|
|
45 |
openapi_key = text
|
46 |
|
47 |
if file is not None:
|
|
|
|
|
|
|
48 |
text_input = file.read().decode('utf-8')
|
49 |
print(text_input)
|
50 |
# ν
μ€νΈμμ μ½λ λΈλ‘μ μ κ±°ν©λλ€.
|
@@ -65,7 +68,7 @@ prompt_translate = gr.Interface(
|
|
65 |
inputs=inputs,
|
66 |
outputs=outputs,
|
67 |
title="ChatGPT Korean Prompt Translation",
|
68 |
-
description="Translate your text into Korean using the GPT-3 model."
|
69 |
)
|
70 |
|
71 |
prompt_translate.launch()
|
|
|
45 |
openapi_key = text
|
46 |
|
47 |
if file is not None:
|
48 |
+
print("Uploaded file name:", file.name)
|
49 |
+
print("Uploaded file content:")
|
50 |
+
print(file.read().decode('utf-8'))
|
51 |
text_input = file.read().decode('utf-8')
|
52 |
print(text_input)
|
53 |
# ν
μ€νΈμμ μ½λ λΈλ‘μ μ κ±°ν©λλ€.
|
|
|
68 |
inputs=inputs,
|
69 |
outputs=outputs,
|
70 |
title="ChatGPT Korean Prompt Translation",
|
71 |
+
description="Translate your text into Korean using the GPT-3 model.", verbose=True
|
72 |
)
|
73 |
|
74 |
prompt_translate.launch()
|