jdelgado2002 commited on
Commit
e396781
·
verified ·
1 Parent(s): 7e9eb72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -2,6 +2,13 @@ import gradio as gr
2
  from fastai.vision.all import *
3
  import os
4
 
 
 
 
 
 
 
 
5
  # Load model
6
  learn = load_learner('model.pkl')
7
  labels = learn.dls.vocab
 
2
  from fastai.vision.all import *
3
  import os
4
 
5
+ # Define the functions to get the x and y values from the input dictionary - in this case, the x value is the image and the y value is the diagnosis
6
+ # needed to load the model since we defined them during training
7
+ def get_x(r): return ""
8
+
9
+ def get_y(r): return r['diagnosis']
10
+
11
+
12
  # Load model
13
  learn = load_learner('model.pkl')
14
  labels = learn.dls.vocab