rafaym commited on
Commit
d9f3598
·
1 Parent(s): 7fe72e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ print(f"Probability it's a black person: {probs[0]:.4f}")
7
 
8
 
9
  #is_black(x) : return x[0].isupper()
10
- categories=('White people','Black people')
11
  def func_classi(img):
12
  pred,idx,probs=learn.predict(img)
13
  return dict(zip(categories,map(float,probs)))
@@ -15,6 +15,6 @@ def func_classi(img):
15
 
16
  image=gr.inputs.Image(shape=(192,192))
17
  label=gr.outputs.Label()
18
- examples=('White people','Black people')
19
  demo = gr.Interface(fn=func_classi, inputs="image", outputs="label")
20
  demo.launch(inline=False)
 
7
 
8
 
9
  #is_black(x) : return x[0].isupper()
10
+ categories=('Black people','White people')
11
  def func_classi(img):
12
  pred,idx,probs=learn.predict(img)
13
  return dict(zip(categories,map(float,probs)))
 
15
 
16
  image=gr.inputs.Image(shape=(192,192))
17
  label=gr.outputs.Label()
18
+ examples=('Black people','White people')
19
  demo = gr.Interface(fn=func_classi, inputs="image", outputs="label")
20
  demo.launch(inline=False)