Update app.py
Browse files
app.py
CHANGED
@@ -31,6 +31,10 @@ detector50 = pipeline(model="facebook/detr-resnet-50")
|
|
31 |
|
32 |
detector101 = pipeline(model="facebook/detr-resnet-101")
|
33 |
|
|
|
|
|
|
|
|
|
34 |
|
35 |
|
36 |
COLORS = ["#ff7f7f", "#ff7fbf", "#ff7fff", "#bf7fff",
|
|
|
31 |
|
32 |
detector101 = pipeline(model="facebook/detr-resnet-101")
|
33 |
|
34 |
+
if torch.cuda.is_available():
|
35 |
+
print("use cuda")
|
36 |
+
detector50.model.to('cuda')
|
37 |
+
detector101.model.to('cuda')
|
38 |
|
39 |
|
40 |
COLORS = ["#ff7f7f", "#ff7fbf", "#ff7fff", "#bf7fff",
|