Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,8 @@ from PIL import Image
|
|
8 |
import numpy as np
|
9 |
|
10 |
image_processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
11 |
-
model = DetrForObjectDetection.from_pretrained("Guy2/AirportSec-150epoch")
|
|
|
12 |
id2label = {0: 'dangerous-items', 1: 'Gun', 2: 'Knife', 3: 'Pliers', 4: 'Scissors', 5: 'Wrench'}
|
13 |
def anylize(url):
|
14 |
image = Image.open(requests.get(url, stream=True).raw)
|
|
|
8 |
import numpy as np
|
9 |
|
10 |
image_processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
|
11 |
+
# model = DetrForObjectDetection.from_pretrained("Guy2/AirportSec-150epoch")
|
12 |
+
model = DetrForObjectDetection.from_pretrained("taroii/airport-security")
|
13 |
id2label = {0: 'dangerous-items', 1: 'Gun', 2: 'Knife', 3: 'Pliers', 4: 'Scissors', 5: 'Wrench'}
|
14 |
def anylize(url):
|
15 |
image = Image.open(requests.get(url, stream=True).raw)
|