Update app.py
Browse files
app.py
CHANGED
@@ -75,12 +75,12 @@ def process_file(input_file):
|
|
75 |
def run_detection_and_ocr():
|
76 |
# Load models
|
77 |
ocr_model = Model.load('hezarai/crnn-fa-printed-96-long')
|
78 |
-
yolo_model = YOLO("/
|
79 |
|
80 |
input_folder = 'output_images'
|
81 |
yolo_model.predict(input_folder, save=True, imgsz=320, conf=0.5, save_crop=True)
|
82 |
|
83 |
-
output_folder = '/
|
84 |
results = []
|
85 |
|
86 |
for filename in os.listdir(input_folder):
|
|
|
75 |
def run_detection_and_ocr():
|
76 |
# Load models
|
77 |
ocr_model = Model.load('hezarai/crnn-fa-printed-96-long')
|
78 |
+
yolo_model = YOLO("/best.pt")
|
79 |
|
80 |
input_folder = 'output_images'
|
81 |
yolo_model.predict(input_folder, save=True, imgsz=320, conf=0.5, save_crop=True)
|
82 |
|
83 |
+
output_folder = '/runs/detect/predict'
|
84 |
results = []
|
85 |
|
86 |
for filename in os.listdir(input_folder):
|