prithivMLmods commited on
Commit
c4a3c6a
Β·
verified Β·
1 Parent(s): 9769d61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -149,15 +149,15 @@ with gr.Blocks(title="🐳DeepSeek-OCR🐳", theme=gr.themes.Soft()) as demo:
149
 
150
  with gr.Row():
151
  with gr.Column(scale=1):
152
- image_input = gr.Image(type="pil", label="πŸ–ΌοΈ Upload Image", sources=["upload", "clipboard"])
153
  model_size = gr.Dropdown(choices=["Tiny", "Small", "Base", "Large", "Gundam (Recommended)"], value="Gundam (Recommended)", label="βš™οΈ Resolution Size")
154
  task_type = gr.Dropdown(choices=["πŸ“ Free OCR", "πŸ“„ Convert to Markdown", "πŸ“ˆ Parse Figure", "πŸ” Locate Object by Reference"], value="πŸ“„ Convert to Markdown", label="πŸš€ Task Type")
155
  ref_text_input = gr.Textbox(label="πŸ“ Reference Text (for Locate task)", placeholder="e.g., the teacher, 20-10, a red car...", visible=False)
156
  submit_btn = gr.Button("Process Image", variant="primary")
157
 
158
  with gr.Column(scale=2):
159
- output_text = gr.Textbox(label="πŸ“„ Text Result", lines=15, show_copy_button=True)
160
- output_image = gr.Image(label="πŸ–ΌοΈ Image Result (if any)", type="pil")
161
 
162
  # --- UI Interaction Logic ---
163
  def toggle_ref_text_visibility(task):
 
149
 
150
  with gr.Row():
151
  with gr.Column(scale=1):
152
+ image_input = gr.Image(type="pil", label="Upload Image", sources=["upload", "clipboard"])
153
  model_size = gr.Dropdown(choices=["Tiny", "Small", "Base", "Large", "Gundam (Recommended)"], value="Gundam (Recommended)", label="βš™οΈ Resolution Size")
154
  task_type = gr.Dropdown(choices=["πŸ“ Free OCR", "πŸ“„ Convert to Markdown", "πŸ“ˆ Parse Figure", "πŸ” Locate Object by Reference"], value="πŸ“„ Convert to Markdown", label="πŸš€ Task Type")
155
  ref_text_input = gr.Textbox(label="πŸ“ Reference Text (for Locate task)", placeholder="e.g., the teacher, 20-10, a red car...", visible=False)
156
  submit_btn = gr.Button("Process Image", variant="primary")
157
 
158
  with gr.Column(scale=2):
159
+ output_text = gr.Textbox(label="Output(OCR)", lines=15, show_copy_button=True)
160
+ output_image = gr.Image(label="Layout Detection(If Any)", type="pil")
161
 
162
  # --- UI Interaction Logic ---
163
  def toggle_ref_text_visibility(task):