Spaces:
Sleeping
Sleeping
adding examples
Browse files- app.py +10 -1
- examples/1.jpg +0 -0
- examples/2.jpg +0 -0
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import fastai.vision.all as fv
|
3 |
from PIL import Image, ImageDraw
|
4 |
import skimage
|
|
|
5 |
|
6 |
learn = fv.load_learner("model.pkl")
|
7 |
|
@@ -40,5 +41,13 @@ def call(image, step_size:int=100, blocks:int=4):
|
|
40 |
title = "Traffic Light Detector"
|
41 |
description = "Experiment traffic light detection to evaluate the value of captcha security controls"
|
42 |
|
43 |
-
iface = gr.Interface(fn=call,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
iface.launch()
|
|
|
2 |
import fastai.vision.all as fv
|
3 |
from PIL import Image, ImageDraw
|
4 |
import skimage
|
5 |
+
import os
|
6 |
|
7 |
learn = fv.load_learner("model.pkl")
|
8 |
|
|
|
41 |
title = "Traffic Light Detector"
|
42 |
description = "Experiment traffic light detection to evaluate the value of captcha security controls"
|
43 |
|
44 |
+
iface = gr.Interface(fn=call,
|
45 |
+
inputs="image",
|
46 |
+
outputs="image",
|
47 |
+
title=title,
|
48 |
+
description=description,
|
49 |
+
examples=[
|
50 |
+
os.path.join(os.path.dirname(__file__), "examples/1.jpg"),
|
51 |
+
os.path.join(os.path.dirname(__file__), "examples/2.jpg")
|
52 |
+
])
|
53 |
iface.launch()
|
examples/1.jpg
ADDED
examples/2.jpg
ADDED