arj7192 commited on
Commit
1fd28d9
·
verified ·
1 Parent(s): a5a9aba

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- speech_bubbles = gr.Image(type="numpy", label="Detected Speech Bubbles", interactive=False)
606
- detected_boxes = gr.Image(type="numpy", label="Detected Text Regions", interactive=False)
607
- removed_text = gr.Image(type="numpy", label="Removed Text", interactive=False)
 
 
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