tienanh2003 commited on
Commit
aaf8ec5
·
verified ·
1 Parent(s): 6d80d48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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.