testmail-gmail commited on
Commit
5a9b7cc
·
1 Parent(s): 008e844

adding one more image for text conversion

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ from utils.torch_utils import select_device, load_classifier, time_synchronized,
18
  os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt")
19
  os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt")
20
 
21
- def detect_Custom(img,model):
22
  if model =='Yolo_v7_Custom_trained_By_Owais':
23
  model='best' # Naming Convention for yolov7 See output file of https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/data
24
  parser = argparse.ArgumentParser()
@@ -172,4 +172,4 @@ examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Y
172
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
173
 
174
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
175
- gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["Yolo_v7_Custom_trained_By_Owais","yolov7","yolov7-e6"])],gr.Image(type="pil"),css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()
 
18
  os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7.pt")
19
  os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7-e6.pt")
20
 
21
+ def detect_Custom(img,model,boundedImage):
22
  if model =='Yolo_v7_Custom_trained_By_Owais':
23
  model='best' # Naming Convention for yolov7 See output file of https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/data
24
  parser = argparse.ArgumentParser()
 
172
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
173
 
174
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
175
+ gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["Yolo_v7_Custom_trained_By_Owais","yolov7","yolov7-e6"]),gr.Image(type="pil")],gr.Image(type="pil"),css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()