Upload app.py
Browse files
app.py
CHANGED
@@ -611,23 +611,24 @@ with gr.Blocks(title="Nativ - Demo") as demo:
|
|
611 |
# Translation editing section
|
612 |
with gr.Row():
|
613 |
with gr.Column():
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
|
|
629 |
with gr.Column():
|
630 |
-
|
631 |
|
632 |
def process_and_show_translations(image, source_lang, target_lang, mode, font, font_color):
|
633 |
boxes, bubbles, removed, final, translations, mask = process_image(image, source_lang, target_lang, mode, font, font_color)
|
|
|
611 |
# Translation editing section
|
612 |
with gr.Row():
|
613 |
with gr.Column():
|
614 |
+
with gr.Column():
|
615 |
+
translations_text = gr.Textbox(
|
616 |
+
label="Edit Translations (one per line)",
|
617 |
+
lines=5,
|
618 |
+
placeholder="Edit translations here..."
|
619 |
+
)
|
620 |
+
with gr.Column():
|
621 |
+
font_selector_f = gr.Dropdown(
|
622 |
+
choices=['Arial', 'Ldfcomicsansbold', 'Times New Roman', 'georgia', 'calibri', 'Verdana', 'omniscript_bold', 'helvetica'], # Add more fonts as needed
|
623 |
+
value='omniscript_bold',
|
624 |
+
label="Select Font"
|
625 |
+
)
|
626 |
+
font_color_picker_f = gr.ColorPicker(
|
627 |
+
value="#000000", # Default color: black
|
628 |
+
label="Select Font Color"
|
629 |
+
)
|
630 |
with gr.Column():
|
631 |
+
update_btn = gr.Button("Apply Changes")
|
632 |
|
633 |
def process_and_show_translations(image, source_lang, target_lang, mode, font, font_color):
|
634 |
boxes, bubbles, removed, final, translations, mask = process_image(image, source_lang, target_lang, mode, font, font_color)
|