Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -228,7 +228,7 @@ def extract_fields_from_image(image_path, progress=None):
|
|
| 228 |
progress(0.25, desc="Preparing prompt...")
|
| 229 |
|
| 230 |
# Prompt engineering: Carefully crafted prompt for multilingual form extraction
|
| 231 |
-
prompt = "<image_soft_token> Extract all form field labels
|
| 232 |
print(f"[Prompt] Using engineered prompt: {prompt[:80]}...")
|
| 233 |
|
| 234 |
if progress:
|
|
|
|
| 228 |
progress(0.25, desc="Preparing prompt...")
|
| 229 |
|
| 230 |
# Prompt engineering: Carefully crafted prompt for multilingual form extraction
|
| 231 |
+
prompt = "<image_soft_token> Extract all the 19 form field labels from this image. Return ONLY a JSON object where keys are field names and values are 'text'. For Hindi/Devanagari forms, preserve the original script. Do NOT include any introductory or concluding text."
|
| 232 |
print(f"[Prompt] Using engineered prompt: {prompt[:80]}...")
|
| 233 |
|
| 234 |
if progress:
|