Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from torchvision import transforms
|
|
9 |
model = torch.hub.load(
|
10 |
"RF5/danbooru-pretrained",
|
11 |
"resnet50",
|
12 |
-
map_location=
|
13 |
)
|
14 |
model.eval()
|
15 |
|
@@ -53,4 +53,4 @@ threshold = inputs.Slider(
|
|
53 |
labels = outputs.Label(type="confidence")
|
54 |
|
55 |
interface = gradio.Interface(main, inputs=[image, threshold], outputs=[labels])
|
56 |
-
interface.launch()
|
|
|
9 |
model = torch.hub.load(
|
10 |
"RF5/danbooru-pretrained",
|
11 |
"resnet50",
|
12 |
+
map_location="cpu",
|
13 |
)
|
14 |
model.eval()
|
15 |
|
|
|
53 |
labels = outputs.Label(type="confidence")
|
54 |
|
55 |
interface = gradio.Interface(main, inputs=[image, threshold], outputs=[labels])
|
56 |
+
interface.launch()
|