Spaces:
Runtime error

limitedonly41 commited on
Commit
ea3d54c
·
verified ·
1 Parent(s): 042b855

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -56,7 +56,7 @@ image_transform = transforms.Compose([
56
 
57
  # EasyOCR Reader for text extraction
58
  # ocr_reader = easyocr.Reader(['en', 'de'], gpu=False) # Supports English and German
59
- ocr_reader = easyocr.Reader(['en', 'de'], model_storage_directory="./")
60
 
61
  # CLIP Processor
62
  clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
@@ -82,6 +82,9 @@ def run_inference(image, device):
82
  # Load image from the Gradio input
83
  global model
84
 
 
 
 
85
  # Initialize model if not already loaded
86
  if model is None:
87
  model_path = hf_hub_download(repo_id="limitedonly41/offers_26",
 
56
 
57
  # EasyOCR Reader for text extraction
58
  # ocr_reader = easyocr.Reader(['en', 'de'], gpu=False) # Supports English and German
59
+ # ocr_reader = easyocr.Reader(['en', 'de'], model_storage_directory="./")
60
 
61
  # CLIP Processor
62
  clip_processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
 
82
  # Load image from the Gradio input
83
  global model
84
 
85
+ ocr_reader = easyocr.Reader(['en', 'de'], gpu=True) # Supports English and German
86
+
87
+
88
  # Initialize model if not already loaded
89
  if model is None:
90
  model_path = hf_hub_download(repo_id="limitedonly41/offers_26",