sswam commited on
Commit
42318b3
1 Parent(s): b094b57

add title, description, examples, and interpretation

Browse files
Files changed (5) hide show
  1. app.py +10 -3
  2. eg/Frost.jpg +0 -0
  3. eg/Heisenberg.jpg +0 -0
  4. eg/grizzly.jpg +0 -0
  5. eg/latex.png +0 -0
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  from fastai.vision.all import *
2
  import gradio as gr
3
 
@@ -10,9 +12,14 @@ def predict(img):
10
  return dict(zip(labels, map(float, probs)))
11
 
12
  iface = gr.Interface(
13
- fn=predict,
14
- inputs=gr.inputs.Image(shape=(512,512)),
15
- outputs=gr.outputs.Label(num_top_classes=3)
 
 
 
 
 
16
  )
17
 
18
  iface.launch()
 
1
+ #!/usr/bin/env python3
2
+
3
  from fastai.vision.all import *
4
  import gradio as gr
5
 
 
12
  return dict(zip(labels, map(float, probs)))
13
 
14
  iface = gr.Interface(
15
+ title = "Photo Checker",
16
+ description = "Check if one of our family photos is good or not. It tries to exclude screenshots, photos of computer screens, photos of papers, images with lots of text, and very blurry images. I intend to use this to separate the good photos for a slide show on our TV. It achieves over 99% accuracy based on my testing.",
17
+ fn = predict,
18
+ inputs = gr.inputs.Image(shape = (512,512)),
19
+ outputs = gr.outputs.Label(num_top_classes = 3),
20
+ examples = list(map(str, get_image_files('eg'))),
21
+ interpretation='default',
22
+ # enable_queue=True,
23
  )
24
 
25
  iface.launch()
eg/Frost.jpg ADDED
eg/Heisenberg.jpg ADDED
eg/grizzly.jpg ADDED
eg/latex.png ADDED