Spaces:
Sleeping
Sleeping
Commit ·
5cf6369
1
Parent(s): 1482837
making sure end page always greater than start page and in the same seeing getting the same value output even if the pipeline generated is different
Browse files
services/pipeline_generator.py
CHANGED
|
@@ -116,12 +116,15 @@ For general questions, greetings, or information requests - just have a normal c
|
|
| 116 |
- Use "classify" (NOT "classify_text")
|
| 117 |
- For text-processing tools (summarize, ner, translator, classify): ALWAYS use start_page=1, end_page=1
|
| 118 |
- For extraction tools (extract_text, extract_tables, images, signatures, stamps): use actual page ranges
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
Return ONLY valid JSON:
|
| 121 |
{{
|
| 122 |
"pipeline_name": "descriptive-name",
|
| 123 |
"components": [
|
| 124 |
-
{{"tool_name": "extract_text", "start_page": 1, "end_page":
|
| 125 |
{{"tool_name": "summarize", "start_page": 1, "end_page": 1, "params": {{"max_length": 500}}}}
|
| 126 |
],
|
| 127 |
"target_lang": null,
|
|
|
|
| 116 |
- Use "classify" (NOT "classify_text")
|
| 117 |
- For text-processing tools (summarize, ner, translator, classify): ALWAYS use start_page=1, end_page=1
|
| 118 |
- For extraction tools (extract_text, extract_tables, images, signatures, stamps): use actual page ranges
|
| 119 |
+
- **NEVER use negative page numbers (e.g., end_page: -1 is FORBIDDEN)**
|
| 120 |
+
- **To process ALL pages, ALWAYS use end_page: 999 (NOT -1!)**
|
| 121 |
+
- **start_page and end_page must ALWAYS be positive integers >= 1**
|
| 122 |
|
| 123 |
Return ONLY valid JSON:
|
| 124 |
{{
|
| 125 |
"pipeline_name": "descriptive-name",
|
| 126 |
"components": [
|
| 127 |
+
{{"tool_name": "extract_text", "start_page": 1, "end_page": 999, "params": {{"encoding": "utf-8"}}}},
|
| 128 |
{{"tool_name": "summarize", "start_page": 1, "end_page": 1, "params": {{"max_length": 500}}}}
|
| 129 |
],
|
| 130 |
"target_lang": null,
|