Spaces:
Running
Running
improve mcp docstring descriptions
Browse files
app.py
CHANGED
|
@@ -179,23 +179,7 @@ def ocr_demo(image, task, ocr_type, ocr_box, ocr_color):
|
|
| 179 |
Main OCR demonstration function that processes images and returns results.
|
| 180 |
|
| 181 |
Args:
|
| 182 |
-
image (Union[dict, np.ndarray, str, PIL.Image]): Input image in one of these formats:
|
| 183 |
-
- dict: Image component state with keys:
|
| 184 |
-
- path: str | None (Path to local file)
|
| 185 |
-
- url: str | None (Public URL or base64 image)
|
| 186 |
-
- size: int | None (Image size in bytes)
|
| 187 |
-
- orig_name: str | None (Original filename)
|
| 188 |
-
- mime_type: str | None (Image MIME type)
|
| 189 |
-
- is_stream: bool (Always False)
|
| 190 |
-
- meta: dict(str, Any)
|
| 191 |
-
- dict: ImageEditor component state with keys:
|
| 192 |
-
- background: filepath | None
|
| 193 |
-
- layers: list[filepath]
|
| 194 |
-
- composite: filepath | None
|
| 195 |
-
- id: str | None
|
| 196 |
-
- np.ndarray: Raw image array
|
| 197 |
-
- str: Path to image file
|
| 198 |
-
- PIL.Image: PIL Image object
|
| 199 |
task (Literal['Plain Text OCR', 'Format Text OCR', 'Fine-grained OCR (Box)',
|
| 200 |
'Fine-grained OCR (Color)', 'Multi-crop OCR', 'Render Formatted OCR']):
|
| 201 |
Selected OCR task type
|
|
|
|
| 179 |
Main OCR demonstration function that processes images and returns results.
|
| 180 |
|
| 181 |
Args:
|
| 182 |
+
image (Union[dict, np.ndarray, str, PIL.Image]): Input image in one of these formats: Image component state with keys: path: str | None (Path to local file) url: str | None (Public URL or base64 image) size: int | None (Image size in bytes) orig_name: str | None (Original filename) mime_type: str | None (Image MIME type) is_stream: bool (Always False) meta: dict(str, Any) OR dict: ImageEditor component state with keys: background: filepath | None layers: list[filepath] composite: filepath | None id: str | None OR np.ndarray: Raw image array str: Path to image file PIL.Image: PIL Image object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
task (Literal['Plain Text OCR', 'Format Text OCR', 'Fine-grained OCR (Box)',
|
| 184 |
'Fine-grained OCR (Color)', 'Multi-crop OCR', 'Render Formatted OCR']):
|
| 185 |
Selected OCR task type
|