Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -180,7 +180,7 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
| 180 |
"""Generate responses for image input using the selected model."""
|
| 181 |
if model_name == "Nanonets-OCR2-3B":
|
| 182 |
processor, model = processor_m, model_m
|
| 183 |
-
elif model_name == "Nanonets-OCR2-1.5B
|
| 184 |
processor, model = processor_n, model_n
|
| 185 |
elif model_name == "Dots.OCR":
|
| 186 |
processor, model = processor_d, model_d
|
|
@@ -259,7 +259,7 @@ with gr.Blocks(css=css, theme=steel_blue_theme) as demo:
|
|
| 259 |
formatted_output = gr.Markdown(label="Formatted Result")
|
| 260 |
|
| 261 |
model_choice = gr.Radio(
|
| 262 |
-
choices=["Nanonets-OCR2-3B", "Nanonets-OCR2-1.5B
|
| 263 |
label="Select Model",
|
| 264 |
value="Nanonets-OCR2-3B"
|
| 265 |
)
|
|
|
|
| 180 |
"""Generate responses for image input using the selected model."""
|
| 181 |
if model_name == "Nanonets-OCR2-3B":
|
| 182 |
processor, model = processor_m, model_m
|
| 183 |
+
elif model_name == "Nanonets-OCR2-1.5B(exp)":
|
| 184 |
processor, model = processor_n, model_n
|
| 185 |
elif model_name == "Dots.OCR":
|
| 186 |
processor, model = processor_d, model_d
|
|
|
|
| 259 |
formatted_output = gr.Markdown(label="Formatted Result")
|
| 260 |
|
| 261 |
model_choice = gr.Radio(
|
| 262 |
+
choices=["Nanonets-OCR2-3B", "Dots.OCR", "Nanonets-OCR2-1.5B(exp)", "PaddleOCR"],
|
| 263 |
label="Select Model",
|
| 264 |
value="Nanonets-OCR2-3B"
|
| 265 |
)
|