Aumkeshchy2003 commited on
Commit
9af1953
·
verified ·
1 Parent(s): 0b92ced

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  import torch
2
  import torchvision
3
  from torchvision.transforms import functional as F
@@ -44,4 +52,4 @@ iface = gr.Interface(
44
  live=True
45
  )
46
 
47
- iface.launch()
 
1
+ import os
2
+ import subprocess
3
+
4
+ # Clone the yolov5 repository and install its requirements
5
+ if not os.path.exists('yolov5'):
6
+ subprocess.run(['git', 'clone', 'https://github.com/ultralytics/yolov5'], check=True)
7
+ subprocess.run(['pip', 'install', '-r', 'yolov5/requirements.txt'], check=True)
8
+
9
  import torch
10
  import torchvision
11
  from torchvision.transforms import functional as F
 
52
  live=True
53
  )
54
 
55
+ iface.launch()