Spaces:
Sleeping
Sleeping
Deploy deepseek-ai/DeepSeek-OCR-2
Browse files
app.py
CHANGED
|
@@ -176,7 +176,7 @@ def get_status():
|
|
| 176 |
return "\n".join(lines)
|
| 177 |
|
| 178 |
|
| 179 |
-
# Simple Gradio Interface
|
| 180 |
demo = gr.Interface(
|
| 181 |
fn=run_ocr,
|
| 182 |
inputs=gr.Image(type="pil", label="Upload Image"),
|
|
@@ -184,8 +184,8 @@ demo = gr.Interface(
|
|
| 184 |
title="DeepSeek-OCR-2",
|
| 185 |
description=f"Upload an image to extract text. Model: {MODEL_NAME} | Device: {DEVICE}\n\nNote: First request loads the model (~1-2 min on CPU).",
|
| 186 |
allow_flagging="never",
|
| 187 |
-
api_name=
|
| 188 |
)
|
| 189 |
|
| 190 |
if __name__ == "__main__":
|
| 191 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 176 |
return "\n".join(lines)
|
| 177 |
|
| 178 |
|
| 179 |
+
# Simple Gradio Interface - disable API docs to avoid schema bugs
|
| 180 |
demo = gr.Interface(
|
| 181 |
fn=run_ocr,
|
| 182 |
inputs=gr.Image(type="pil", label="Upload Image"),
|
|
|
|
| 184 |
title="DeepSeek-OCR-2",
|
| 185 |
description=f"Upload an image to extract text. Model: {MODEL_NAME} | Device: {DEVICE}\n\nNote: First request loads the model (~1-2 min on CPU).",
|
| 186 |
allow_flagging="never",
|
| 187 |
+
api_name=False # Disable API to avoid schema generation bug
|
| 188 |
)
|
| 189 |
|
| 190 |
if __name__ == "__main__":
|
| 191 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False)
|