Spaces:
Running
on
Zero
Running
on
Zero
fix-bug: process_image should have 4 arguments
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ model = model.eval()
|
|
| 18 |
|
| 19 |
|
| 20 |
@spaces.GPU
|
| 21 |
-
def process_image(image, model_size, task_type):
|
| 22 |
"""
|
| 23 |
Process image with DeepSeek-OCR and return multiple output formats.
|
| 24 |
|
|
@@ -78,7 +78,7 @@ def process_image(image, model_size, task_type):
|
|
| 78 |
crop_mode=config["crop_mode"],
|
| 79 |
save_results=True, # Ensure results are saved to disk
|
| 80 |
test_compress=True,
|
| 81 |
-
|
| 82 |
)
|
| 83 |
|
| 84 |
# Define paths for the generated files
|
|
@@ -184,4 +184,3 @@ with gr.Blocks(title="DeepSeek-OCR", theme=gr.themes.Soft()) as demo:
|
|
| 184 |
if __name__ == "__main__":
|
| 185 |
demo.queue(max_size=20)
|
| 186 |
demo.launch()
|
| 187 |
-
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
@spaces.GPU
|
| 21 |
+
def process_image(image, model_size, task_type, is_eval_mode):
|
| 22 |
"""
|
| 23 |
Process image with DeepSeek-OCR and return multiple output formats.
|
| 24 |
|
|
|
|
| 78 |
crop_mode=config["crop_mode"],
|
| 79 |
save_results=True, # Ensure results are saved to disk
|
| 80 |
test_compress=True,
|
| 81 |
+
eval_mode=is_eval_mode,
|
| 82 |
)
|
| 83 |
|
| 84 |
# Define paths for the generated files
|
|
|
|
| 184 |
if __name__ == "__main__":
|
| 185 |
demo.queue(max_size=20)
|
| 186 |
demo.launch()
|
|
|