akhaliq HF staff commited on
Commit
efe0532
1 Parent(s): 0c3507c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import torch
3
  from PIL import Image
4
-
5
  # Images
6
  torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg', 'zidane.jpg')
7
  torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/bus.jpg', 'bus.jpg')
@@ -9,7 +9,6 @@ torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master
9
  # Model
10
  model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # force_reload=True to update
11
 
12
- os.mkdir("out")
13
  def yolo(im, size=640):
14
  g = (size / max(im.size)) # gain
15
  im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
 
1
  import gradio as gr
2
  import torch
3
  from PIL import Image
4
+ import os
5
  # Images
6
  torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg', 'zidane.jpg')
7
  torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/bus.jpg', 'bus.jpg')
 
9
  # Model
10
  model = torch.hub.load('ultralytics/yolov5', 'yolov5s') # force_reload=True to update
11
 
 
12
  def yolo(im, size=640):
13
  g = (size / max(im.size)) # gain
14
  im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize