Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -263,7 +263,7 @@ def extract_fields_from_image(image_path, progress=None):
|
|
| 263 |
with torch.no_grad():
|
| 264 |
outputs = model.generate(
|
| 265 |
**inputs,
|
| 266 |
-
max_new_tokens=
|
| 267 |
do_sample=False, # Deterministic output
|
| 268 |
num_beams=1, # Single beam for efficiency
|
| 269 |
temperature=0.1, # Low temperature for consistency
|
|
|
|
| 263 |
with torch.no_grad():
|
| 264 |
outputs = model.generate(
|
| 265 |
**inputs,
|
| 266 |
+
max_new_tokens=256, # Optimized for CPU speed
|
| 267 |
do_sample=False, # Deterministic output
|
| 268 |
num_beams=1, # Single beam for efficiency
|
| 269 |
temperature=0.1, # Low temperature for consistency
|