Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -229,6 +229,9 @@ def run_inference(img: Image.Image, prompt: str = "", max_new_tokens: int = 512)
|
|
229 |
img = img.convert("RGB")
|
230 |
return f"[DEBUG] Ảnh nhận: size={img.size}, prompt='{prompt[:30]}...'"
|
231 |
|
|
|
|
|
|
|
232 |
# --- 9. Prompt templates & JSON export ---
|
233 |
prompt_templates = {
|
234 |
"Electrolux": """Extract all structured information from the delivery order document image.
|
|
|
229 |
img = img.convert("RGB")
|
230 |
return f"[DEBUG] Ảnh nhận: size={img.size}, prompt='{prompt[:30]}...'"
|
231 |
|
232 |
+
def run_inference_on_text(img: Image.Image, prompt: str = "", max_new_tokens: int = 512) -> str:
|
233 |
+
return f"[DEBUG] Total..."
|
234 |
+
|
235 |
# --- 9. Prompt templates & JSON export ---
|
236 |
prompt_templates = {
|
237 |
"Electrolux": """Extract all structured information from the delivery order document image.
|