Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -218,8 +218,7 @@ def _infer_image(image_path: str) -> str:
|
|
| 218 |
**inputs,
|
| 219 |
max_new_tokens=MAX_NEW_TOKENS,
|
| 220 |
do_sample=False,
|
| 221 |
-
repetition_penalty=1.
|
| 222 |
-
no_repeat_ngram_size=5,
|
| 223 |
)
|
| 224 |
|
| 225 |
result = processor.decode(
|
|
@@ -227,8 +226,7 @@ def _infer_image(image_path: str) -> str:
|
|
| 227 |
skip_special_tokens=True,
|
| 228 |
)
|
| 229 |
|
| 230 |
-
|
| 231 |
-
result = _normalize_tables(result.strip())
|
| 232 |
|
| 233 |
return result
|
| 234 |
|
|
|
|
| 218 |
**inputs,
|
| 219 |
max_new_tokens=MAX_NEW_TOKENS,
|
| 220 |
do_sample=False,
|
| 221 |
+
repetition_penalty=1.1,
|
|
|
|
| 222 |
)
|
| 223 |
|
| 224 |
result = processor.decode(
|
|
|
|
| 226 |
skip_special_tokens=True,
|
| 227 |
)
|
| 228 |
|
| 229 |
+
result = result.strip()
|
|
|
|
| 230 |
|
| 231 |
return result
|
| 232 |
|