Xin Liu commited on
Commit
6c4485f
1 Parent(s): b5b8d33
Files changed (40) hide show
  1. app.py +4 -4
  2. samples/case101_day26_slice_0096_266_266_1.50_1.50.png +0 -0
  3. samples/case107_day0_slice_0089_266_266_1.50_1.50.png +0 -0
  4. samples/case107_day21_slice_0069_266_266_1.50_1.50.png +0 -0
  5. samples/case113_day12_slice_0108_360_310_1.50_1.50.png +0 -0
  6. samples/case119_day20_slice_0063_266_266_1.50_1.50.png +0 -0
  7. samples/case119_day25_slice_0075_266_266_1.50_1.50.png +0 -0
  8. samples/case119_day25_slice_0095_266_266_1.50_1.50.png +0 -0
  9. samples/case121_day14_slice_0057_266_266_1.50_1.50.png +0 -0
  10. samples/case122_day25_slice_0087_266_266_1.50_1.50.png +0 -0
  11. samples/case124_day19_slice_0110_266_266_1.50_1.50.png +0 -0
  12. samples/case124_day20_slice_0110_266_266_1.50_1.50.png +0 -0
  13. samples/case130_day0_slice_0106_266_266_1.50_1.50.png +0 -0
  14. samples/case134_day21_slice_0085_360_310_1.50_1.50.png +0 -0
  15. samples/case139_day0_slice_0062_234_234_1.50_1.50.png +0 -0
  16. samples/case139_day18_slice_0094_266_266_1.50_1.50.png +0 -0
  17. samples/case146_day25_slice_0053_276_276_1.63_1.63.png +0 -0
  18. samples/case147_day0_slice_0085_360_310_1.50_1.50.png +0 -0
  19. samples/case148_day0_slice_0113_360_310_1.50_1.50.png +0 -0
  20. samples/case29_day0_slice_0065_266_266_1.50_1.50.png +0 -0
  21. samples/case2_day1_slice_0054_266_266_1.50_1.50.png +0 -0
  22. samples/case2_day1_slice_0077_266_266_1.50_1.50.png +0 -0
  23. samples/case32_day19_slice_0091_266_266_1.50_1.50.png +0 -0
  24. samples/case32_day19_slice_0100_266_266_1.50_1.50.png +0 -0
  25. samples/case33_day21_slice_0114_266_266_1.50_1.50.png +0 -0
  26. samples/case36_day16_slice_0064_266_266_1.50_1.50.png +0 -0
  27. samples/case40_day0_slice_0094_266_266_1.50_1.50.png +0 -0
  28. samples/case41_day25_slice_0049_266_266_1.50_1.50.png +0 -0
  29. samples/case63_day22_slice_0076_266_266_1.50_1.50.png +0 -0
  30. samples/case63_day26_slice_0093_266_266_1.50_1.50.png +0 -0
  31. samples/case65_day28_slice_0133_266_266_1.50_1.50.png +0 -0
  32. samples/case66_day36_slice_0101_266_266_1.50_1.50.png +0 -0
  33. samples/case67_day0_slice_0049_266_266_1.50_1.50.png +0 -0
  34. samples/case67_day0_slice_0086_266_266_1.50_1.50.png +0 -0
  35. samples/case74_day18_slice_0101_266_266_1.50_1.50.png +0 -0
  36. samples/case74_day19_slice_0084_266_266_1.50_1.50.png +0 -0
  37. samples/case81_day28_slice_0066_266_266_1.50_1.50.png +0 -0
  38. samples/case85_day29_slice_0102_360_310_1.50_1.50.png +0 -0
  39. samples/case89_day19_slice_0082_360_310_1.50_1.50.png +0 -0
  40. 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
- label = ['Cancer', 'No Cancer']
10
 
11
  def classificador(im):
12
  pred,idx,probs = learn.predict(im)
13
- return dict(zip(label, map(float, probs)))
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(inline=False)
 
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)