AustinL commited on
Commit
ff86068
·
verified ·
1 Parent(s): de89db3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -24
app.py CHANGED
@@ -20,30 +20,6 @@ for dirname, _, filenames in os.walk('/kaggle/input'):
20
 
21
  import gradio as gr
22
 
23
- import gradio as gr
24
-
25
-
26
- def is_healthy(x): return x[0].isupper()
27
-
28
- im = PILImage.create('/kaggle/input/healthy-cells/istockphoto-1376243518-612x612.jpg')
29
- im.thumbnail((192,192))
30
- im
31
-
32
- learn = load_learner('Model PKL/ML HT6 Model 1.pkl')
33
-
34
- learn.predict(im)
35
-
36
- categories = ('Healthy Cell', 'Leukemia', 'Sickle Cell', 'Thalassemia')
37
- def classify_image(img):
38
- pred,idx,probs = learn.predict(img)
39
- return dict(zip(categories, map(float,probs)))
40
-
41
- classify_image(im)
42
-
43
- import gradio as gr
44
-
45
-
46
-
47
  # Assuming no shape needs to be specified directly in the constructor
48
  image = gr.Image()
49
  label = gr.Label()
 
20
 
21
  import gradio as gr
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  # Assuming no shape needs to be specified directly in the constructor
24
  image = gr.Image()
25
  label = gr.Label()