Spaces:
Runtime error
Runtime error
Xin Liu
commited on
Commit
•
6c4485f
1
Parent(s):
b5b8d33
sample
Browse files- app.py +4 -4
- samples/case101_day26_slice_0096_266_266_1.50_1.50.png +0 -0
- samples/case107_day0_slice_0089_266_266_1.50_1.50.png +0 -0
- samples/case107_day21_slice_0069_266_266_1.50_1.50.png +0 -0
- samples/case113_day12_slice_0108_360_310_1.50_1.50.png +0 -0
- samples/case119_day20_slice_0063_266_266_1.50_1.50.png +0 -0
- samples/case119_day25_slice_0075_266_266_1.50_1.50.png +0 -0
- samples/case119_day25_slice_0095_266_266_1.50_1.50.png +0 -0
- samples/case121_day14_slice_0057_266_266_1.50_1.50.png +0 -0
- samples/case122_day25_slice_0087_266_266_1.50_1.50.png +0 -0
- samples/case124_day19_slice_0110_266_266_1.50_1.50.png +0 -0
- samples/case124_day20_slice_0110_266_266_1.50_1.50.png +0 -0
- samples/case130_day0_slice_0106_266_266_1.50_1.50.png +0 -0
- samples/case134_day21_slice_0085_360_310_1.50_1.50.png +0 -0
- samples/case139_day0_slice_0062_234_234_1.50_1.50.png +0 -0
- samples/case139_day18_slice_0094_266_266_1.50_1.50.png +0 -0
- samples/case146_day25_slice_0053_276_276_1.63_1.63.png +0 -0
- samples/case147_day0_slice_0085_360_310_1.50_1.50.png +0 -0
- samples/case148_day0_slice_0113_360_310_1.50_1.50.png +0 -0
- samples/case29_day0_slice_0065_266_266_1.50_1.50.png +0 -0
- samples/case2_day1_slice_0054_266_266_1.50_1.50.png +0 -0
- samples/case2_day1_slice_0077_266_266_1.50_1.50.png +0 -0
- samples/case32_day19_slice_0091_266_266_1.50_1.50.png +0 -0
- samples/case32_day19_slice_0100_266_266_1.50_1.50.png +0 -0
- samples/case33_day21_slice_0114_266_266_1.50_1.50.png +0 -0
- samples/case36_day16_slice_0064_266_266_1.50_1.50.png +0 -0
- samples/case40_day0_slice_0094_266_266_1.50_1.50.png +0 -0
- samples/case41_day25_slice_0049_266_266_1.50_1.50.png +0 -0
- samples/case63_day22_slice_0076_266_266_1.50_1.50.png +0 -0
- samples/case63_day26_slice_0093_266_266_1.50_1.50.png +0 -0
- samples/case65_day28_slice_0133_266_266_1.50_1.50.png +0 -0
- samples/case66_day36_slice_0101_266_266_1.50_1.50.png +0 -0
- samples/case67_day0_slice_0049_266_266_1.50_1.50.png +0 -0
- samples/case67_day0_slice_0086_266_266_1.50_1.50.png +0 -0
- samples/case74_day18_slice_0101_266_266_1.50_1.50.png +0 -0
- samples/case74_day19_slice_0084_266_266_1.50_1.50.png +0 -0
- samples/case81_day28_slice_0066_266_266_1.50_1.50.png +0 -0
- samples/case85_day29_slice_0102_360_310_1.50_1.50.png +0 -0
- samples/case89_day19_slice_0082_360_310_1.50_1.50.png +0 -0
- samples/case89_day20_slice_0087_266_266_1.50_1.50.png +0 -0
app.py
CHANGED
@@ -6,15 +6,15 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
6 |
#learn = load_learner('edureyyy/MamographyClassifier/ModelSuperKek.pkl')
|
7 |
learn = load_learner('ModelSuperKek.pkl')
|
8 |
|
9 |
-
|
10 |
|
11 |
def classificador(im):
|
12 |
pred,idx,probs = learn.predict(im)
|
13 |
-
return dict(zip(
|
14 |
|
15 |
imatge = gr.inputs.Image(shape=(192,192))
|
16 |
label = gr.outputs.Label()
|
17 |
-
example = ['samples/12305_1995339680_L.png', 'samples/10234_173054723_L.png' ]
|
18 |
|
19 |
intf = gr.Interface(fn=classificador, inputs = imatge, outputs = label,examples=example)
|
20 |
-
intf.launch(
|
|
|
6 |
#learn = load_learner('edureyyy/MamographyClassifier/ModelSuperKek.pkl')
|
7 |
learn = load_learner('ModelSuperKek.pkl')
|
8 |
|
9 |
+
categories = ('Cancer', 'No Cancer')
|
10 |
|
11 |
def classificador(im):
|
12 |
pred,idx,probs = learn.predict(im)
|
13 |
+
return dict(zip(categories, map(float, probs)))
|
14 |
|
15 |
imatge = gr.inputs.Image(shape=(192,192))
|
16 |
label = gr.outputs.Label()
|
17 |
+
example = 'archive/rsna22_bal/rsna22_bal/images_png' #['samples/12305_1995339680_L.png', 'samples/10234_173054723_L.png' ]
|
18 |
|
19 |
intf = gr.Interface(fn=classificador, inputs = imatge, outputs = label,examples=example)
|
20 |
+
intf.launch(share=True)
|
samples/case101_day26_slice_0096_266_266_1.50_1.50.png
DELETED
Binary file (36.3 kB)
|
|
samples/case107_day0_slice_0089_266_266_1.50_1.50.png
DELETED
Binary file (39 kB)
|
|
samples/case107_day21_slice_0069_266_266_1.50_1.50.png
DELETED
Binary file (38.2 kB)
|
|
samples/case113_day12_slice_0108_360_310_1.50_1.50.png
DELETED
Binary file (38.8 kB)
|
|
samples/case119_day20_slice_0063_266_266_1.50_1.50.png
DELETED
Binary file (40.9 kB)
|
|
samples/case119_day25_slice_0075_266_266_1.50_1.50.png
DELETED
Binary file (40.9 kB)
|
|
samples/case119_day25_slice_0095_266_266_1.50_1.50.png
DELETED
Binary file (38.7 kB)
|
|
samples/case121_day14_slice_0057_266_266_1.50_1.50.png
DELETED
Binary file (32.6 kB)
|
|
samples/case122_day25_slice_0087_266_266_1.50_1.50.png
DELETED
Binary file (37.1 kB)
|
|
samples/case124_day19_slice_0110_266_266_1.50_1.50.png
DELETED
Binary file (29.4 kB)
|
|
samples/case124_day20_slice_0110_266_266_1.50_1.50.png
DELETED
Binary file (31 kB)
|
|
samples/case130_day0_slice_0106_266_266_1.50_1.50.png
DELETED
Binary file (28.8 kB)
|
|
samples/case134_day21_slice_0085_360_310_1.50_1.50.png
DELETED
Binary file (41.8 kB)
|
|
samples/case139_day0_slice_0062_234_234_1.50_1.50.png
DELETED
Binary file (22.5 kB)
|
|
samples/case139_day18_slice_0094_266_266_1.50_1.50.png
DELETED
Binary file (28.1 kB)
|
|
samples/case146_day25_slice_0053_276_276_1.63_1.63.png
DELETED
Binary file (34.8 kB)
|
|
samples/case147_day0_slice_0085_360_310_1.50_1.50.png
DELETED
Binary file (40.7 kB)
|
|
samples/case148_day0_slice_0113_360_310_1.50_1.50.png
DELETED
Binary file (28.8 kB)
|
|
samples/case29_day0_slice_0065_266_266_1.50_1.50.png
DELETED
Binary file (36.3 kB)
|
|
samples/case2_day1_slice_0054_266_266_1.50_1.50.png
DELETED
Binary file (30.9 kB)
|
|
samples/case2_day1_slice_0077_266_266_1.50_1.50.png
DELETED
Binary file (29.2 kB)
|
|
samples/case32_day19_slice_0091_266_266_1.50_1.50.png
DELETED
Binary file (38.8 kB)
|
|
samples/case32_day19_slice_0100_266_266_1.50_1.50.png
DELETED
Binary file (38.6 kB)
|
|
samples/case33_day21_slice_0114_266_266_1.50_1.50.png
DELETED
Binary file (32.4 kB)
|
|
samples/case36_day16_slice_0064_266_266_1.50_1.50.png
DELETED
Binary file (38.1 kB)
|
|
samples/case40_day0_slice_0094_266_266_1.50_1.50.png
DELETED
Binary file (33.8 kB)
|
|
samples/case41_day25_slice_0049_266_266_1.50_1.50.png
DELETED
Binary file (26 kB)
|
|
samples/case63_day22_slice_0076_266_266_1.50_1.50.png
DELETED
Binary file (30.7 kB)
|
|
samples/case63_day26_slice_0093_266_266_1.50_1.50.png
DELETED
Binary file (31 kB)
|
|
samples/case65_day28_slice_0133_266_266_1.50_1.50.png
DELETED
Binary file (36 kB)
|
|
samples/case66_day36_slice_0101_266_266_1.50_1.50.png
DELETED
Binary file (36.9 kB)
|
|
samples/case67_day0_slice_0049_266_266_1.50_1.50.png
DELETED
Binary file (29.9 kB)
|
|
samples/case67_day0_slice_0086_266_266_1.50_1.50.png
DELETED
Binary file (28.8 kB)
|
|
samples/case74_day18_slice_0101_266_266_1.50_1.50.png
DELETED
Binary file (30 kB)
|
|
samples/case74_day19_slice_0084_266_266_1.50_1.50.png
DELETED
Binary file (28.2 kB)
|
|
samples/case81_day28_slice_0066_266_266_1.50_1.50.png
DELETED
Binary file (33.5 kB)
|
|
samples/case85_day29_slice_0102_360_310_1.50_1.50.png
DELETED
Binary file (43.6 kB)
|
|
samples/case89_day19_slice_0082_360_310_1.50_1.50.png
DELETED
Binary file (39.6 kB)
|
|
samples/case89_day20_slice_0087_266_266_1.50_1.50.png
DELETED
Binary file (35.4 kB)
|
|