Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
try:
|
2 |
import detectron2
|
3 |
except:
|
4 |
-
import os
|
5 |
os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
|
6 |
|
7 |
import cv2
|
8 |
-
|
9 |
from matplotlib.pyplot import axis
|
10 |
import gradio as gr
|
11 |
import requests
|
@@ -66,7 +66,7 @@ gr.Interface(
|
|
66 |
[gr.inputs.Textbox(label="Image URL", placeholder="https://api.digitale-sammlungen.de/iiif/image/v2/bsb10483966_00008/full/500,/0/default.jpg"),
|
67 |
gr.inputs.Image(type="numpy", label="Input Image"),
|
68 |
gr.Slider(minimum=0.0, maximum=1.0, value=0.5, label="Minimum score"),
|
69 |
-
],
|
70 |
gr.outputs.Image(type="pil", label="Output"),
|
71 |
title=title,
|
72 |
description=description,
|
|
|
1 |
try:
|
2 |
import detectron2
|
3 |
except:
|
4 |
+
import os
|
5 |
os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
|
6 |
|
7 |
import cv2
|
8 |
+
import torch
|
9 |
from matplotlib.pyplot import axis
|
10 |
import gradio as gr
|
11 |
import requests
|
|
|
66 |
[gr.inputs.Textbox(label="Image URL", placeholder="https://api.digitale-sammlungen.de/iiif/image/v2/bsb10483966_00008/full/500,/0/default.jpg"),
|
67 |
gr.inputs.Image(type="numpy", label="Input Image"),
|
68 |
gr.Slider(minimum=0.0, maximum=1.0, value=0.5, label="Minimum score"),
|
69 |
+
],
|
70 |
gr.outputs.Image(type="pil", label="Output"),
|
71 |
title=title,
|
72 |
description=description,
|