rafaym commited on
Commit
c3d4490
·
1 Parent(s): 326e30b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,9 +4,9 @@ import gradio as gr
4
 
5
  #is_black(x) : return x[0].isupper()
6
  categories=('Black people','White people')
7
- def func_classi(img):
8
  learn=load_learner('model.pkl')
9
- race,_,probs = learn.predict(PILImage.create(img))
10
  print(f"This is a: {race}.")
11
  print(f"Probability it's a black person: {probs[0]:.4f}.\nProbability it's a white person: {probs[1]:.4f}")
12
 
 
4
 
5
  #is_black(x) : return x[0].isupper()
6
  categories=('Black people','White people')
7
+ def func_classi(image):
8
  learn=load_learner('model.pkl')
9
+ race,_,probs = learn.predict(PILImage.create(image))
10
  print(f"This is a: {race}.")
11
  print(f"Probability it's a black person: {probs[0]:.4f}.\nProbability it's a white person: {probs[1]:.4f}")
12