Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
learn=load_learner('model.pkl')
|
4 |
-
race,_,probs = learn.predict(PILImage.create(
|
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 |
|
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
learn=load_learner('model.pkl')
|
4 |
+
race,_,probs = learn.predict(PILImage.create(img))
|
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 |
|