Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=('
|
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=('
|
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)
|