testmail-gmail commited on
Commit
1f25ae8
·
1 Parent(s): 63080cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -137,7 +137,6 @@ def detect_Custom(img):
137
  y1 = int(xyxy[1].item())
138
  x2 = int(xyxy[2].item())
139
  y2 = int(xyxy[3].item())
140
-
141
  orig_img = im0
142
  crop_img = im0[y1:y2, x1:x2]
143
  cv2.imwrite('MRZ_1.png', crop_img)
@@ -186,7 +185,7 @@ def detect_Custom(img):
186
  return Image.fromarray(im0[:,:,::-1]), output_text
187
 
188
 
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 = (
@@ -204,4 +203,4 @@ examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Y
204
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
205
 
206
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
207
- gr.Interface(detect_Custom,[gr.Image(type="pil")],[gr.Image(type="pil"),output],css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()
 
137
  y1 = int(xyxy[1].item())
138
  x2 = int(xyxy[2].item())
139
  y2 = int(xyxy[3].item())
 
140
  orig_img = im0
141
  crop_img = im0[y1:y2, x1:x2]
142
  cv2.imwrite('MRZ_1.png', crop_img)
 
185
  return Image.fromarray(im0[:,:,::-1]), output_text
186
 
187
 
188
+ output = gr.Textbox(label="Validation",elem_id="opbox")
189
  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>"
190
 
191
  Footer = (
 
203
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
204
 
205
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
206
+ gr.Interface(detect_Custom,gr.Image(type="pil"),[gr.Image(type="pil"),output],css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()