rafaym commited on
Commit
18f416c
·
1 Parent(s): d9f3598

Update app.py

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