Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,6 +50,7 @@ def run_ocr(image: Image.Image) -> str:
|
|
| 50 |
|
| 51 |
# Generate text from the image
|
| 52 |
# Note: max_new_tokens can be adjusted based on expected text length
|
|
|
|
| 53 |
generated_ids = model.generate(
|
| 54 |
input_ids=inputs["input_ids"],
|
| 55 |
pixel_values=inputs["pixel_values"],
|
|
|
|
| 50 |
|
| 51 |
# Generate text from the image
|
| 52 |
# Note: max_new_tokens can be adjusted based on expected text length
|
| 53 |
+
os.environ["DISABLE_FLASH_ATTN"] = "1"
|
| 54 |
generated_ids = model.generate(
|
| 55 |
input_ids=inputs["input_ids"],
|
| 56 |
pixel_values=inputs["pixel_values"],
|