Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -32,15 +32,6 @@ model_m = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
|
32 |
torch_dtype=torch.float16
|
33 |
).to(device).eval()
|
34 |
|
35 |
-
# Load OVR-7B-RL
|
36 |
-
MODEL_ID_X = "Kangheng/OVR-7B-RL"
|
37 |
-
processor_x = AutoProcessor.from_pretrained(MODEL_ID_X, trust_remote_code=True)
|
38 |
-
model_x = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
39 |
-
MODEL_ID_X,
|
40 |
-
trust_remote_code=True,
|
41 |
-
torch_dtype=torch.float16
|
42 |
-
).to(device).eval()
|
43 |
-
|
44 |
# Load Megalodon-OCR-Sync-0713
|
45 |
MODEL_ID_T = "prithivMLmods/Megalodon-OCR-Sync-0713"
|
46 |
processor_t = AutoProcessor.from_pretrained(MODEL_ID_T, trust_remote_code=True)
|
@@ -101,9 +92,6 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
101 |
if model_name == "Camel-Doc-OCR-062825":
|
102 |
processor = processor_m
|
103 |
model = model_m
|
104 |
-
elif model_name == "Open-Vision-Reasoner":
|
105 |
-
processor = processor_x
|
106 |
-
model = model_x
|
107 |
elif model_name == "Megalodon-OCR-Sync-0713":
|
108 |
processor = processor_t
|
109 |
model = model_t
|
@@ -160,9 +148,6 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
160 |
if model_name == "Camel-Doc-OCR-062825":
|
161 |
processor = processor_m
|
162 |
model = model_m
|
163 |
-
elif model_name == "Open-Vision-Reasoner":
|
164 |
-
processor = processor_x
|
165 |
-
model = model_x
|
166 |
elif model_name == "Megalodon-OCR-Sync-0713":
|
167 |
processor = processor_t
|
168 |
model = model_t
|
@@ -287,7 +272,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
287 |
markdown_output = gr.Markdown(label="(Result.md)")
|
288 |
|
289 |
model_choice = gr.Radio(
|
290 |
-
choices=["Camel-Doc-OCR-062825", "GLM-4.1V-9B-Thinking", "Megalodon-OCR-Sync-0713", "
|
291 |
label="Select Model",
|
292 |
value="Camel-Doc-OCR-062825"
|
293 |
)
|
|
|
32 |
torch_dtype=torch.float16
|
33 |
).to(device).eval()
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
# Load Megalodon-OCR-Sync-0713
|
36 |
MODEL_ID_T = "prithivMLmods/Megalodon-OCR-Sync-0713"
|
37 |
processor_t = AutoProcessor.from_pretrained(MODEL_ID_T, trust_remote_code=True)
|
|
|
92 |
if model_name == "Camel-Doc-OCR-062825":
|
93 |
processor = processor_m
|
94 |
model = model_m
|
|
|
|
|
|
|
95 |
elif model_name == "Megalodon-OCR-Sync-0713":
|
96 |
processor = processor_t
|
97 |
model = model_t
|
|
|
148 |
if model_name == "Camel-Doc-OCR-062825":
|
149 |
processor = processor_m
|
150 |
model = model_m
|
|
|
|
|
|
|
151 |
elif model_name == "Megalodon-OCR-Sync-0713":
|
152 |
processor = processor_t
|
153 |
model = model_t
|
|
|
272 |
markdown_output = gr.Markdown(label="(Result.md)")
|
273 |
|
274 |
model_choice = gr.Radio(
|
275 |
+
choices=["Camel-Doc-OCR-062825", "GLM-4.1V-9B-Thinking", "Megalodon-OCR-Sync-0713", "DeepEyes-7B-Thinking"],
|
276 |
label="Select Model",
|
277 |
value="Camel-Doc-OCR-062825"
|
278 |
)
|