Spaces:
Runtime error
Runtime error
testmail-gmail
commited on
Commit
·
97e2b7a
1
Parent(s):
92f6d76
Update app.py
Browse files
app.py
CHANGED
@@ -164,7 +164,7 @@ def detect_Custom(img):
|
|
164 |
vid_writer = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
|
165 |
vid_writer.write(im0)
|
166 |
|
167 |
-
output_text = ''
|
168 |
text = pytesseract.image_to_string(Image.open('MRZ_1.png'))
|
169 |
text = text.replace(" ", "")
|
170 |
text=text[22:28]
|
@@ -189,9 +189,7 @@ def detect_Custom(img):
|
|
189 |
output = gr.Textbox(label="Output",elem_id="opbox")
|
190 |
Custom_description="<center>Custom Training Performed on Colab <a href='https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov7-object-detection-on-custom-data.ipynb?authuser=2#scrollTo=1iqOPKjr22mL' style='text-decoration: underline' target='_blank'>Link</a> </center><br> <center>Model trained with test dataset of 'aadhar-card', 'credit-card','prescription' and 'passport' </center>"
|
191 |
|
192 |
-
Footer = (
|
193 |
-
"<center>Model Trained by: IIT Team Informatica for Hackathon 2023</center>"
|
194 |
-
)
|
195 |
|
196 |
examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image3.jpeg", "Yolo_v7_Custom_trained_By_Owais",],["Image4.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image5.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image6.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["horses.jpeg", "yolov7"],["horses.jpeg", "yolov7-e6"]]
|
197 |
|
|
|
164 |
vid_writer = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (w, h))
|
165 |
vid_writer.write(im0)
|
166 |
|
167 |
+
output_text = 'This is not a valid Passport'
|
168 |
text = pytesseract.image_to_string(Image.open('MRZ_1.png'))
|
169 |
text = text.replace(" ", "")
|
170 |
text=text[22:28]
|
|
|
189 |
output = gr.Textbox(label="Output",elem_id="opbox")
|
190 |
Custom_description="<center>Custom Training Performed on Colab <a href='https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov7-object-detection-on-custom-data.ipynb?authuser=2#scrollTo=1iqOPKjr22mL' style='text-decoration: underline' target='_blank'>Link</a> </center><br> <center>Model trained with test dataset of 'aadhar-card', 'credit-card','prescription' and 'passport' </center>"
|
191 |
|
192 |
+
Footer = ("<center>Model Trained by: IIT Team Informatica for Hackathon 2023</center>")
|
|
|
|
|
193 |
|
194 |
examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image3.jpeg", "Yolo_v7_Custom_trained_By_Owais",],["Image4.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image5.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image6.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["horses.jpeg", "yolov7"],["horses.jpeg", "yolov7-e6"]]
|
195 |
|