Upload app.py
Browse files
app.py
CHANGED
@@ -561,7 +561,7 @@ def update_translations(image, edited_texts, translations_list, img_removed_text
|
|
561 |
final_result = position_text_back(new_text, box, final_result, font_path=f"fonts/{font}.ttf", font_color=font_rgba)
|
562 |
|
563 |
return np.array(final_result)
|
564 |
-
|
565 |
|
566 |
with gr.Blocks(title="Nativ - Demo") as demo:
|
567 |
# Store translations list in state
|
@@ -602,9 +602,11 @@ with gr.Blocks(title="Nativ - Demo") as demo:
|
|
602 |
|
603 |
with gr.Column():
|
604 |
# Output components
|
605 |
-
|
606 |
-
|
607 |
-
|
|
|
|
|
608 |
final_output = gr.Image(type="numpy", label="Final Result", interactive=False)
|
609 |
|
610 |
# Translation editing section
|
|
|
561 |
final_result = position_text_back(new_text, box, final_result, font_path=f"fonts/{font}.ttf", font_color=font_rgba)
|
562 |
|
563 |
return np.array(final_result)
|
564 |
+
|
565 |
|
566 |
with gr.Blocks(title="Nativ - Demo") as demo:
|
567 |
# Store translations list in state
|
|
|
602 |
|
603 |
with gr.Column():
|
604 |
# Output components
|
605 |
+
# Wrap the additional outputs in an Accordion
|
606 |
+
with gr.Accordion("Show Detection Details", open=False):
|
607 |
+
speech_bubbles = gr.Image(type="numpy", label="Detected Speech Bubbles", interactive=False)
|
608 |
+
detected_boxes = gr.Image(type="numpy", label="Detected Text Regions", interactive=False)
|
609 |
+
removed_text = gr.Image(type="numpy", label="Removed Text", interactive=False)
|
610 |
final_output = gr.Image(type="numpy", label="Final Result", interactive=False)
|
611 |
|
612 |
# Translation editing section
|