prithivMLmods commited on
Commit
e6e0dc2
·
verified ·
1 Parent(s): a70d85f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -44,6 +44,7 @@ model_m = Qwen2_5_VLForConditionalGeneration.from_pretrained(
44
  torch_dtype=torch.float16
45
  ).to(device).eval()
46
 
 
47
  # Load MonkeyOCR
48
  MODEL_ID_G = "echo840/MonkeyOCR"
49
  SUBFOLDER = "Recognition"
@@ -58,6 +59,7 @@ model_g = Qwen2_5_VLForConditionalGeneration.from_pretrained(
58
  subfolder=SUBFOLDER,
59
  torch_dtype=torch.float16
60
  ).to(device).eval()
 
61
 
62
  # Load Typhoon-OCR-7B
63
  MODEL_ID_L = "scb10x/typhoon-ocr-7b"
@@ -355,13 +357,14 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
355
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.05, maximum=1.0, step=0.05, value=0.9)
356
  top_k = gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50)
357
  repetition_penalty = gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2)
 
358
  with gr.Column():
359
  # Result Canvas with raw and formatted outputs
360
  with gr.Column(elem_classes="canvas-output"):
361
  gr.Markdown("## Result.md")
362
  raw_output = gr.Textbox(label="Raw Output Stream", interactive=False, lines=2)
363
 
364
- with gr.Accordion("Formatted Result (Result.md)", open=False):
365
  formatted_output = gr.Markdown(label="Formatted Result (Result.md)")
366
 
367
  model_choice = gr.Radio(
 
44
  torch_dtype=torch.float16
45
  ).to(device).eval()
46
 
47
+ #-----------------------------subfolder-----------------------------#
48
  # Load MonkeyOCR
49
  MODEL_ID_G = "echo840/MonkeyOCR"
50
  SUBFOLDER = "Recognition"
 
59
  subfolder=SUBFOLDER,
60
  torch_dtype=torch.float16
61
  ).to(device).eval()
62
+ #-----------------------------subfolder-----------------------------#
63
 
64
  # Load Typhoon-OCR-7B
65
  MODEL_ID_L = "scb10x/typhoon-ocr-7b"
 
357
  top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.05, maximum=1.0, step=0.05, value=0.9)
358
  top_k = gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50)
359
  repetition_penalty = gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2)
360
+
361
  with gr.Column():
362
  # Result Canvas with raw and formatted outputs
363
  with gr.Column(elem_classes="canvas-output"):
364
  gr.Markdown("## Result.md")
365
  raw_output = gr.Textbox(label="Raw Output Stream", interactive=False, lines=2)
366
 
367
+ with gr.Accordion("Formatted Result (Result.Md)", open=False):
368
  formatted_output = gr.Markdown(label="Formatted Result (Result.md)")
369
 
370
  model_choice = gr.Radio(