nihalbaig commited on
Commit
ff88673
1 Parent(s): 26bd4c9

updated themes images and model selector

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -4,8 +4,8 @@ import yolov7
4
 
5
 
6
  # Images
7
- torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg', 'zidane.jpg')
8
- torch.hub.download_url_to_file('https://raw.githubusercontent.com/obss/sahi/main/tests/data/small-vehicles1.jpeg', 'small-vehicles1.jpeg')
9
 
10
  def yolov7_inference(
11
  image: gr.inputs.Image = None,
@@ -40,7 +40,7 @@ inputs = [
40
  "nihalbaig/yolov7",
41
 
42
  ],
43
- default="kadirnar/yolov7-tiny-v0.1",
44
  label="Model",
45
  ),
46
  gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
@@ -49,9 +49,9 @@ inputs = [
49
  ]
50
 
51
  outputs = gr.outputs.Image(type="filepath", label="Output Image")
52
- title = "Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors"
53
 
54
- examples = [['small-vehicles1.jpeg', 'kadirnar/yolov7-tiny-v0.1', 640, 0.25, 0.45], ['zidane.jpg', 'kadirnar/yolov7-v0.1', 640, 0.25, 0.45]]
55
  demo_app = gr.Interface(
56
  fn=yolov7_inference,
57
  inputs=inputs,
@@ -59,6 +59,6 @@ demo_app = gr.Interface(
59
  title=title,
60
  examples=examples,
61
  cache_examples=True,
62
- theme='huggingface',
63
  )
64
  demo_app.launch(debug=True, enable_queue=True)
 
4
 
5
 
6
  # Images
7
+ torch.hub.download_url_to_file('https://github.com/nihalbaig0/BD-Vehicle-Detection/blob/main/images/bondor_to_kodomtoli.jpg', 'bondor_to_kodomtoli.jpg')
8
+ torch.hub.download_url_to_file('https://github.com/nihalbaig0/BD-Vehicle-Detection/blob/main/images/lamabazar_to_versitygate.jpg', 'lamabazar_to_versitygate.jpg')
9
 
10
  def yolov7_inference(
11
  image: gr.inputs.Image = None,
 
40
  "nihalbaig/yolov7",
41
 
42
  ],
43
+ default="nihalbaig0/yolov7",
44
  label="Model",
45
  ),
46
  gr.inputs.Slider(minimum=320, maximum=1280, default=640, step=32, label="Image Size"),
 
49
  ]
50
 
51
  outputs = gr.outputs.Image(type="filepath", label="Output Image")
52
+ title = "Project-350: BD Vehicle Detection for Autonomous Vehicle"
53
 
54
+ examples = [['bondor_to_kodomtoli.jpg', 'nihalbaig0/yolov7', 640, 0.25, 0.45], ['lamabazar_to_versitygate.jpg', 'nihalbaig0/yolov7', 640, 0.25, 0.45]]
55
  demo_app = gr.Interface(
56
  fn=yolov7_inference,
57
  inputs=inputs,
 
59
  title=title,
60
  examples=examples,
61
  cache_examples=True,
62
+ theme='darkhuggingface',
63
  )
64
  demo_app.launch(debug=True, enable_queue=True)