Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,8 +132,8 @@ net = build_model(hypar, device)
|
|
| 132 |
|
| 133 |
|
| 134 |
def inference(image):
|
| 135 |
-
image_path =
|
| 136 |
-
|
| 137 |
image_tensor, orig_size = load_image(image_path, hypar)
|
| 138 |
mask = predict(net, image_tensor, orig_size, hypar, device)
|
| 139 |
|
|
@@ -154,7 +154,7 @@ article = "<div><center><img src='https://visitor-badge.glitch.me/badge?page_id=
|
|
| 154 |
|
| 155 |
interface = gr.Interface(
|
| 156 |
fn=inference,
|
| 157 |
-
inputs=
|
| 158 |
outputs=["image","image","image"],
|
| 159 |
title=title,
|
| 160 |
description=description,
|
|
|
|
| 132 |
|
| 133 |
|
| 134 |
def inference(image):
|
| 135 |
+
image_path = "1.jpg"
|
| 136 |
+
gdown.download(image, image_path, quiet=False)
|
| 137 |
image_tensor, orig_size = load_image(image_path, hypar)
|
| 138 |
mask = predict(net, image_tensor, orig_size, hypar, device)
|
| 139 |
|
|
|
|
| 154 |
|
| 155 |
interface = gr.Interface(
|
| 156 |
fn=inference,
|
| 157 |
+
inputs="textbox",
|
| 158 |
outputs=["image","image","image"],
|
| 159 |
title=title,
|
| 160 |
description=description,
|