murphybrendan commited on
Commit
128e759
·
1 Parent(s): ead14b7

Let's see if this works

Browse files
Files changed (6) hide show
  1. app.py +20 -0
  2. examples/black.jpg +0 -0
  3. examples/grizzly.jpg +0 -0
  4. examples/teddy.jpg +0 -0
  5. export.pkl +3 -0
  6. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ title = "Bear Classifier"
5
+ description = "A classifier that differentiates between grizzly, black, and teddy bears."
6
+ examples = [f'examples/{bear_type}.jpg' for bear_type in {'grizzly', 'black', 'teddy'}]
7
+ queue_size = 20
8
+
9
+
10
+ demo = gr.Interface(
11
+ fn=predict,
12
+ inputs=gr.Image(width=512, height=512),
13
+ outputs=gr.Label(num_top_classes=3),
14
+ title=title,
15
+ description=description,
16
+ examples=examples
17
+ )
18
+ demo.queue(max_size=queue_size)
19
+ demo.launch()
20
+
examples/black.jpg ADDED
examples/grizzly.jpg ADDED
examples/teddy.jpg ADDED
export.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bc49a5de53bf075ed580831504559fafeed819db7c99cf3eba8ac81f440f695
3
+ size 46975294
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastai
2
+ scikit-image