Spaces:
Build error
Build error
fixing code
Browse files
app.py
CHANGED
|
@@ -34,16 +34,10 @@ def translate_text_text(input_text, input_dest_lang):
|
|
| 34 |
|
| 35 |
|
| 36 |
with gr.Blocks() as demo:
|
| 37 |
-
# input_json = gr.components.File(label="Upload JSON file")
|
| 38 |
-
# input_dest_lang = gr.components.Textbox(placeholder='Example input: vi',label="Destination Language")
|
| 39 |
-
# input_text = gr.components.Textbox(placeholder='Example inputs: I love you, I love you than myself', label="Enter Text")
|
| 40 |
-
# translated_text = gr.components.Textbox(placeholder='Example outputs: Anh yêu em, Anh yêu em hơn bản thân mình',
|
| 41 |
-
# label="Translated Text")
|
| 42 |
-
|
| 43 |
with gr.Column():
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
input_json = gr.
|
| 47 |
|
| 48 |
submit_json = gr.Button("Submit Json")
|
| 49 |
submit_json.click(
|
|
@@ -52,11 +46,9 @@ with gr.Blocks() as demo:
|
|
| 52 |
[translated_text_json]
|
| 53 |
)
|
| 54 |
with gr.Column():
|
| 55 |
-
translated_text_text = gr.Textbox(
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
input_dest_lang = gr.components.Textbox(placeholder='Example input: vi', label="Destination Language")
|
| 59 |
-
input_text = gr.components.Textbox(placeholder='Example inputs: I love you, I love you than myself',
|
| 60 |
label="Enter Text")
|
| 61 |
submit_text = gr.Button("Submit Text")
|
| 62 |
submit_text.click(
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
with gr.Column():
|
| 38 |
+
|
| 39 |
+
translated_text_json = gr.Textbox(label="Translated Text for JSON file")
|
| 40 |
+
input_json = gr.File(label="Upload JSON file")
|
| 41 |
|
| 42 |
submit_json = gr.Button("Submit Json")
|
| 43 |
submit_json.click(
|
|
|
|
| 46 |
[translated_text_json]
|
| 47 |
)
|
| 48 |
with gr.Column():
|
| 49 |
+
translated_text_text = gr.Textbox(label="Translated Text for Input Text and Dest Lang")
|
| 50 |
+
input_dest_lang = gr.Textbox(placeholder='Example input: vi', label="Destination Language")
|
| 51 |
+
input_text = gr.Textbox(placeholder='Example inputs: I love you, I love you than myself',
|
|
|
|
|
|
|
| 52 |
label="Enter Text")
|
| 53 |
submit_text = gr.Button("Submit Text")
|
| 54 |
submit_text.click(
|