Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,8 +59,8 @@ model_s = Glm4vForConditionalGeneration.from_pretrained(
|
|
| 59 |
torch_dtype=torch.float16
|
| 60 |
).to(device).eval()
|
| 61 |
|
| 62 |
-
# Load
|
| 63 |
-
MODEL_ID_Y = "
|
| 64 |
processor_y = AutoProcessor.from_pretrained(MODEL_ID_Y, trust_remote_code=True)
|
| 65 |
model_y = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 66 |
MODEL_ID_Y,
|
|
@@ -107,7 +107,7 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
| 107 |
elif model_name == "GLM-4.1V-9B-Thinking":
|
| 108 |
processor = processor_s
|
| 109 |
model = model_s
|
| 110 |
-
elif model_name == "
|
| 111 |
processor = processor_y
|
| 112 |
model = model_y
|
| 113 |
elif model_name == "Qwen2.5-VL-3B-Instruct-abliterated":
|
|
@@ -166,7 +166,7 @@ def generate_video(model_name: str, text: str, video_path: str,
|
|
| 166 |
elif model_name == "GLM-4.1V-9B-Thinking":
|
| 167 |
processor = processor_s
|
| 168 |
model = model_s
|
| 169 |
-
elif model_name == "
|
| 170 |
processor = processor_y
|
| 171 |
model = model_y
|
| 172 |
elif model_name == "Qwen2.5-VL-3B-Instruct-abliterated":
|
|
@@ -286,7 +286,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
| 286 |
markdown_output = gr.Markdown(label="(Result.md)")
|
| 287 |
|
| 288 |
model_choice = gr.Radio(
|
| 289 |
-
choices=["Camel-Doc-OCR-062825", "GLM-4.1V-9B-Thinking", "Megalodon-OCR-Sync-0713", "
|
| 290 |
label="Select Model",
|
| 291 |
value="Camel-Doc-OCR-062825"
|
| 292 |
)
|
|
|
|
| 59 |
torch_dtype=torch.float16
|
| 60 |
).to(device).eval()
|
| 61 |
|
| 62 |
+
# Load NuMarkdown-8B-Thinking
|
| 63 |
+
MODEL_ID_Y = "numind/NuMarkdown-8B-Thinking"
|
| 64 |
processor_y = AutoProcessor.from_pretrained(MODEL_ID_Y, trust_remote_code=True)
|
| 65 |
model_y = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 66 |
MODEL_ID_Y,
|
|
|
|
| 107 |
elif model_name == "GLM-4.1V-9B-Thinking":
|
| 108 |
processor = processor_s
|
| 109 |
model = model_s
|
| 110 |
+
elif model_name == "NuMarkdown-8B-Thinking":
|
| 111 |
processor = processor_y
|
| 112 |
model = model_y
|
| 113 |
elif model_name == "Qwen2.5-VL-3B-Instruct-abliterated":
|
|
|
|
| 166 |
elif model_name == "GLM-4.1V-9B-Thinking":
|
| 167 |
processor = processor_s
|
| 168 |
model = model_s
|
| 169 |
+
elif model_name == "NuMarkdown-8B-Thinking":
|
| 170 |
processor = processor_y
|
| 171 |
model = model_y
|
| 172 |
elif model_name == "Qwen2.5-VL-3B-Instruct-abliterated":
|
|
|
|
| 286 |
markdown_output = gr.Markdown(label="(Result.md)")
|
| 287 |
|
| 288 |
model_choice = gr.Radio(
|
| 289 |
+
choices=["Camel-Doc-OCR-062825", "GLM-4.1V-9B-Thinking", "Megalodon-OCR-Sync-0713", "NuMarkdown-8B-Thinking", "Qwen2.5-VL-3B-Instruct-abliterated"],
|
| 290 |
label="Select Model",
|
| 291 |
value="Camel-Doc-OCR-062825"
|
| 292 |
)
|