ammariii08 commited on
Commit
8010d4b
·
verified ·
1 Parent(s): 12da56c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -59,7 +59,7 @@ def process_image(input_image):
59
 
60
  # OPTIMIZATION: Resize the image to reduce processing time
61
  # Calculate aspect ratio to maintain proportions
62
- max_size = (640, 640) # Further reduced from 800x800
63
  cropped_image.thumbnail(max_size, Image.LANCZOS)
64
 
65
  # Select the corresponding OCR prompt based on the YOLO label
@@ -111,7 +111,7 @@ def process_image(input_image):
111
 
112
  output = ocr_model.generate(
113
  **inputs,
114
- temperature=0.2,
115
  max_new_tokens=1024,
116
  num_return_sequences=1,
117
  do_sample=True,
 
59
 
60
  # OPTIMIZATION: Resize the image to reduce processing time
61
  # Calculate aspect ratio to maintain proportions
62
+ max_size = (800, 800) # Further reduced from 800x800
63
  cropped_image.thumbnail(max_size, Image.LANCZOS)
64
 
65
  # Select the corresponding OCR prompt based on the YOLO label
 
111
 
112
  output = ocr_model.generate(
113
  **inputs,
114
+ temperature=0.8,
115
  max_new_tokens=1024,
116
  num_return_sequences=1,
117
  do_sample=True,