OmarAbualrob commited on
Commit
aa1a282
·
verified ·
1 Parent(s): 2cebb6d

Update app.py

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