Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -66,10 +66,10 @@ model_j = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
|
66 |
torch_dtype=torch.float16
|
67 |
).to(device).eval()
|
68 |
|
69 |
-
# Load
|
70 |
-
MODEL_ID_F = "
|
71 |
processor_f = AutoProcessor.from_pretrained(MODEL_ID_F, trust_remote_code=True)
|
72 |
-
model_f =
|
73 |
MODEL_ID_F,
|
74 |
trust_remote_code=True,
|
75 |
torch_dtype=torch.float16
|
@@ -118,7 +118,7 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
118 |
elif model_name == "Lumian-VLR-7B-Thinking":
|
119 |
processor = processor_j
|
120 |
model = model_j
|
121 |
-
elif model_name == "
|
122 |
processor = processor_f
|
123 |
model = model_f
|
124 |
else:
|
@@ -177,7 +177,7 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
177 |
elif model_name == "Lumian-VLR-7B-Thinking":
|
178 |
processor = processor_j
|
179 |
model = model_j
|
180 |
-
elif model_name == "
|
181 |
processor = processor_f
|
182 |
model = model_f
|
183 |
else:
|
@@ -302,7 +302,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
302 |
markdown_output = gr.Markdown(label="(Result.Md)")
|
303 |
|
304 |
model_choice = gr.Radio(
|
305 |
-
choices=["Lumian-VLR-7B-Thinking", "DREX-062225-7B-exp", "olmOCR-7B-0225-preview", "
|
306 |
label="Select Model",
|
307 |
value="Lumian-VLR-7B-Thinking"
|
308 |
)
|
|
|
66 |
torch_dtype=torch.float16
|
67 |
).to(device).eval()
|
68 |
|
69 |
+
# Load LMM-R1-MGT-PerceReason
|
70 |
+
MODEL_ID_F = "VLM-Reasoner/LMM-R1-MGT-PerceReason"
|
71 |
processor_f = AutoProcessor.from_pretrained(MODEL_ID_F, trust_remote_code=True)
|
72 |
+
model_f = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
73 |
MODEL_ID_F,
|
74 |
trust_remote_code=True,
|
75 |
torch_dtype=torch.float16
|
|
|
118 |
elif model_name == "Lumian-VLR-7B-Thinking":
|
119 |
processor = processor_j
|
120 |
model = model_j
|
121 |
+
elif model_name == "LMM-R1-MGT-PerceReason":
|
122 |
processor = processor_f
|
123 |
model = model_f
|
124 |
else:
|
|
|
177 |
elif model_name == "Lumian-VLR-7B-Thinking":
|
178 |
processor = processor_j
|
179 |
model = model_j
|
180 |
+
elif model_name == "LMM-R1-MGT-PerceReason":
|
181 |
processor = processor_f
|
182 |
model = model_f
|
183 |
else:
|
|
|
302 |
markdown_output = gr.Markdown(label="(Result.Md)")
|
303 |
|
304 |
model_choice = gr.Radio(
|
305 |
+
choices=["Lumian-VLR-7B-Thinking", "DREX-062225-7B-exp", "olmOCR-7B-0225-preview", "LMM-R1-MGT-PerceReason", "Typhoon-OCR-3B"],
|
306 |
label="Select Model",
|
307 |
value="Lumian-VLR-7B-Thinking"
|
308 |
)
|