shreyasvaidya commited on
Commit
163b105
·
verified ·
1 Parent(s): 54dd126

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -271,7 +271,7 @@ def process_image(image):
271
  # Initialize list to hold recognized text from each detected area
272
  recognized_texts = {}
273
  pil_image = Image.open(image_path)
274
-
275
  # Process each detected bounding box for script identification and text recognition
276
  for id,bbox in enumerate(detections):
277
  # Identify the script and crop the image to this region
@@ -290,7 +290,7 @@ def process_image(image):
290
 
291
 
292
  # Combine recognized texts into a single string for display
293
- return output_image, translated
294
 
295
  # Custom HTML for interface header with logos and alignment
296
  interface_html = """
 
271
  # Initialize list to hold recognized text from each detected area
272
  recognized_texts = {}
273
  pil_image = Image.open(image_path)
274
+ script_lang = "english"
275
  # Process each detected bounding box for script identification and text recognition
276
  for id,bbox in enumerate(detections):
277
  # Identify the script and crop the image to this region
 
290
 
291
 
292
  # Combine recognized texts into a single string for display
293
+ return output_image, script_lang + " " +translated
294
 
295
  # Custom HTML for interface header with logos and alignment
296
  interface_html = """