Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,8 @@ model_m = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
|
| 32 |
torch_dtype=torch.float16
|
| 33 |
).to(device).eval()
|
| 34 |
|
| 35 |
-
#
|
| 36 |
-
MODEL_ID_T = "
|
| 37 |
processor_t = AutoProcessor.from_pretrained(MODEL_ID_T, trust_remote_code=True)
|
| 38 |
model_t = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 39 |
MODEL_ID_T,
|
|
@@ -92,7 +92,7 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
| 92 |
if model_name == "Camel-Doc-OCR-062825":
|
| 93 |
processor = processor_m
|
| 94 |
model = model_m
|
| 95 |
-
elif model_name == "
|
| 96 |
processor = processor_t
|
| 97 |
model = model_t
|
| 98 |
elif model_name == "Video-MTR":
|
|
@@ -148,7 +148,7 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
| 148 |
if model_name == "Camel-Doc-OCR-062825":
|
| 149 |
processor = processor_m
|
| 150 |
model = model_m
|
| 151 |
-
elif model_name == "
|
| 152 |
processor = processor_t
|
| 153 |
model = model_t
|
| 154 |
elif model_name == "Video-MTR":
|
|
@@ -268,14 +268,14 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
| 268 |
with gr.Accordion("(Result.md)", open=False):
|
| 269 |
markdown_output = gr.Markdown(label="(Result.md)")
|
| 270 |
model_choice = gr.Radio(
|
| 271 |
-
choices=["Camel-Doc-OCR-062825", "Video-MTR", "
|
| 272 |
label="Select Model",
|
| 273 |
value="Camel-Doc-OCR-062825"
|
| 274 |
)
|
| 275 |
gr.Markdown("**Model Info 💻** | [Report Bug](https://huggingface.co/spaces/prithivMLmods/Multimodal-VLM-v1.0/discussions)")
|
| 276 |
|
| 277 |
gr.Markdown("> [Camel-Doc-OCR-062825](https://huggingface.co/prithivMLmods/Camel-Doc-OCR-062825) is a Qwen2.5-VL-7B-Instruct finetune, highly optimized for document retrieval, structured extraction, analysis, and direct Markdown generation from images and PDFs.")
|
| 278 |
-
gr.Markdown("> [
|
| 279 |
gr.Markdown("> [ViLaSR-7B](https://huggingface.co/inclusionAI/ViLaSR) focuses on reinforcing spatial reasoning in visual-language tasks by combining interwoven thinking with visual drawing, making it especially suited for spatial reasoning and complex tip-based queries.")
|
| 280 |
gr.Markdown("> [Video-MTR](https://huggingface.co/Phoebe13/Video-MTR) introduces reinforced multi-turn reasoning for long-form video understanding, enabling iterative key segment selection and deeper question comprehension.")
|
| 281 |
|
|
|
|
| 32 |
torch_dtype=torch.float16
|
| 33 |
).to(device).eval()
|
| 34 |
|
| 35 |
+
# MinerU2.5-2509
|
| 36 |
+
MODEL_ID_T = "opendatalab/MinerU2.5-2509-1.2B"
|
| 37 |
processor_t = AutoProcessor.from_pretrained(MODEL_ID_T, trust_remote_code=True)
|
| 38 |
model_t = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 39 |
MODEL_ID_T,
|
|
|
|
| 92 |
if model_name == "Camel-Doc-OCR-062825":
|
| 93 |
processor = processor_m
|
| 94 |
model = model_m
|
| 95 |
+
elif model_name == "MinerU2.5-2509":
|
| 96 |
processor = processor_t
|
| 97 |
model = model_t
|
| 98 |
elif model_name == "Video-MTR":
|
|
|
|
| 148 |
if model_name == "Camel-Doc-OCR-062825":
|
| 149 |
processor = processor_m
|
| 150 |
model = model_m
|
| 151 |
+
elif model_name == "MinerU2.5-2509":
|
| 152 |
processor = processor_t
|
| 153 |
model = model_t
|
| 154 |
elif model_name == "Video-MTR":
|
|
|
|
| 268 |
with gr.Accordion("(Result.md)", open=False):
|
| 269 |
markdown_output = gr.Markdown(label="(Result.md)")
|
| 270 |
model_choice = gr.Radio(
|
| 271 |
+
choices=["Camel-Doc-OCR-062825", "Video-MTR", "MinerU2.5-2509", "ViLaSR-7B"],
|
| 272 |
label="Select Model",
|
| 273 |
value="Camel-Doc-OCR-062825"
|
| 274 |
)
|
| 275 |
gr.Markdown("**Model Info 💻** | [Report Bug](https://huggingface.co/spaces/prithivMLmods/Multimodal-VLM-v1.0/discussions)")
|
| 276 |
|
| 277 |
gr.Markdown("> [Camel-Doc-OCR-062825](https://huggingface.co/prithivMLmods/Camel-Doc-OCR-062825) is a Qwen2.5-VL-7B-Instruct finetune, highly optimized for document retrieval, structured extraction, analysis, and direct Markdown generation from images and PDFs.")
|
| 278 |
+
gr.Markdown("> [MinerU2.5-2509](https://huggingface.co/opendatalab/MinerU2.5-2509-1.2B) is a 1.2B-parameter vision-language model for document parsing that achieves state-of-the-art accuracy with high computational efficiency by adopting a two-stage parsing strategy.")
|
| 279 |
gr.Markdown("> [ViLaSR-7B](https://huggingface.co/inclusionAI/ViLaSR) focuses on reinforcing spatial reasoning in visual-language tasks by combining interwoven thinking with visual drawing, making it especially suited for spatial reasoning and complex tip-based queries.")
|
| 280 |
gr.Markdown("> [Video-MTR](https://huggingface.co/Phoebe13/Video-MTR) introduces reinforced multi-turn reasoning for long-form video understanding, enabling iterative key segment selection and deeper question comprehension.")
|
| 281 |
|