Spaces:
Runtime error
Runtime error
Commit
·
8521848
1
Parent(s):
1cfb081
image filepath
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.vision.all import *
|
| 3 |
import skimage
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
title = "Open/Closed Door Classifier"
|
|
@@ -13,7 +14,13 @@ examples = ["open-door.jpg",
|
|
| 13 |
"inside.jpg", "cracked_3.jpg", "old.jpg",
|
| 14 |
"blue.jpg"]
|
| 15 |
|
| 16 |
-
examples = list(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
#print(examples)
|
| 18 |
|
| 19 |
|
|
@@ -34,3 +41,4 @@ iface = gr.Interface(
|
|
| 34 |
description=description,
|
| 35 |
examples=examples).queue().launch()
|
| 36 |
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.vision.all import *
|
| 3 |
import skimage
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
|
| 7 |
title = "Open/Closed Door Classifier"
|
|
|
|
| 14 |
"inside.jpg", "cracked_3.jpg", "old.jpg",
|
| 15 |
"blue.jpg"]
|
| 16 |
|
| 17 |
+
examples = list(
|
| 18 |
+
map(
|
| 19 |
+
lambda x:
|
| 20 |
+
os.path.join(
|
| 21 |
+
os.path.dirname(__file__),
|
| 22 |
+
"examples/" + x),
|
| 23 |
+
examples))
|
| 24 |
#print(examples)
|
| 25 |
|
| 26 |
|
|
|
|
| 41 |
description=description,
|
| 42 |
examples=examples).queue().launch()
|
| 43 |
|
| 44 |
+
|