owaiskha9654 commited on
Commit
8a676f8
1 Parent(s): f8c6194

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,7 +22,7 @@ os.system("wget https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolo
22
 
23
  def detect_Custom(img,model):
24
  if model =='Yolo_v7_Custom_trained_By_Owais':
25
- model='best' # Naming Convention for yolov7
26
  parser = argparse.ArgumentParser()
27
  parser.add_argument('--weights', nargs='+', type=str, default=model+".pt", help='model.pt path(s)')
28
  parser.add_argument('--source', type=str, default='Inference/', help='source')
@@ -158,7 +158,7 @@ def detect_Custom(img,model):
158
 
159
 
160
 
161
- Custom_description="<center>Custom Training Performed on Kaggle <a href='https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/notebook' style='text-decoration: underline' target='_blank'>Link</a> </center><br> <center>Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors </center> <br> <center>Also Please use <b>Images with .jpeg</b> because Yolo V7 Model is trained on GPU and while inferencing default CPU has been implemented</center>"
162
 
163
  Footer = (
164
  "<center>Model Trained by: Owais Ahmad Data Scientist at <b> Thoucentric </b> <a href=\"https://www.linkedin.com/in/owaiskhan9654/\">Visit Profile</a> <br></center>"
@@ -174,4 +174,4 @@ examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Y
174
 
175
  Top_Title="<center>Yolov7 Custom Trained by <a href='https://www.linkedin.com/in/owaiskhan9654/' style='text-decoration: underline' target='_blank'>Owais Ahmad</center></a>"
176
 
177
- gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["best","yolov7","yolov7-e6"])],gr.Image(type="pil"),title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()
 
22
 
23
  def detect_Custom(img,model):
24
  if model =='Yolo_v7_Custom_trained_By_Owais':
25
+ model='best' # Naming Convention for yolov7 See output file of https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/data
26
  parser = argparse.ArgumentParser()
27
  parser.add_argument('--weights', nargs='+', type=str, default=model+".pt", help='model.pt path(s)')
28
  parser.add_argument('--source', type=str, default='Inference/', help='source')
 
158
 
159
 
160
 
161
+ Custom_description="<center>Custom Training Performed on Kaggle <a href='https://www.kaggle.com/code/owaiskhan9654/training-yolov7-on-kaggle-on-custom-dataset/notebook' style='text-decoration: underline' target='_blank'>Link</a> </center><br> <center>Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors </center>"
162
 
163
  Footer = (
164
  "<center>Model Trained by: Owais Ahmad Data Scientist at <b> Thoucentric </b> <a href=\"https://www.linkedin.com/in/owaiskhan9654/\">Visit Profile</a> <br></center>"
 
174
 
175
  Top_Title="<center>Yolov7 Custom Trained by <a href='https://www.linkedin.com/in/owaiskhan9654/' style='text-decoration: underline' target='_blank'>Owais Ahmad</center></a>"
176
 
177
+ 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"),title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()