Spaces:
Runtime error
Runtime error
Bimurat Mukhtar
commited on
Commit
•
2932e56
1
Parent(s):
ba098b8
fixed bug
Browse files- .gitignore +3 -1
- app.py +3 -1
- humface.jpg +0 -0
- mask_model.ipynb +0 -0
- medmask.jpg +0 -0
.gitignore
CHANGED
@@ -1,2 +1,4 @@
|
|
1 |
/.idea
|
2 |
-
.idea/
|
|
|
|
|
|
1 |
/.idea
|
2 |
+
.idea/
|
3 |
+
data/
|
4 |
+
/data
|
app.py
CHANGED
@@ -7,7 +7,7 @@ labels = learn.dls.vocab
|
|
7 |
|
8 |
|
9 |
def predict(img):
|
10 |
-
img = PILImage.create(img)
|
11 |
pred, pred_idx, probs = learn.predict(img)
|
12 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
13 |
|
@@ -17,3 +17,5 @@ gr.Interface(
|
|
17 |
inputs=gr.inputs.Image(shape=(512, 512)),
|
18 |
outputs=gr.outputs.Label(num_top_classes=3)
|
19 |
).launch()
|
|
|
|
|
|
7 |
|
8 |
|
9 |
def predict(img):
|
10 |
+
img = PILImage.create(img).to_thumb(512, 512)
|
11 |
pred, pred_idx, probs = learn.predict(img)
|
12 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
13 |
|
|
|
17 |
inputs=gr.inputs.Image(shape=(512, 512)),
|
18 |
outputs=gr.outputs.Label(num_top_classes=3)
|
19 |
).launch()
|
20 |
+
|
21 |
+
# %%
|
humface.jpg
ADDED
mask_model.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
medmask.jpg
ADDED