mattb512 commited on
Commit
60d260f
1 Parent(s): 968f0c3

adding examples

Browse files
Files changed (3) hide show
  1. app.py +10 -1
  2. examples/1.jpg +0 -0
  3. 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, inputs="image", outputs="image", title=title, description=description)
 
 
 
 
 
 
 
 
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