arj7192 commited on
Commit
b5266ff
·
verified ·
1 Parent(s): ee63335

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -16
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
- translations_text = gr.Textbox(
615
- label="Edit Translations (one per line)",
616
- lines=5,
617
- placeholder="Edit translations here..."
618
- )
619
- with gr.Column():
620
- font_selector_f = gr.Dropdown(
621
- choices=['Arial', 'Ldfcomicsansbold', 'Times New Roman', 'georgia', 'calibri', 'Verdana', 'omniscript_bold', 'helvetica'], # Add more fonts as needed
622
- value='omniscript_bold',
623
- label="Select Font"
624
- )
625
- font_color_picker_f = gr.ColorPicker(
626
- value="#000000", # Default color: black
627
- label="Select Font Color"
628
- )
 
629
  with gr.Column():
630
- update_btn = gr.Button("Apply Changes")
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)