Spaces:
Running
Running
Update app.py
Browse files
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()
|