Jose M Delgado commited on
Commit
1450441
1 Parent(s): 065b1dc

updating links to include model card

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -2,6 +2,8 @@ import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
4
 
 
 
5
  def get_x(r): return ""
6
 
7
  def get_y(r): return r['diagnosis']
@@ -37,8 +39,12 @@ description = """Detects severity of diabetic retinopathy from a given retina im
37
 
38
  4 - Proliferative DR
39
  """
40
- article="<p style='text-align: center'><a href='https://www.kaggle.com/code/josemauriciodelgado/proliferative-retinopathy' target='_blank'>Notebook</a></p>"
41
-
 
 
 
 
42
  # Get a list of all image paths in the test folder
43
  test_folder = "test" # replace with the actual path to your test folder
44
  image_paths = [os.path.join(test_folder, img) for img in os.listdir(test_folder) if img.endswith(('.png', '.jpg', '.jpeg'))]
 
2
  from fastai.vision.all import *
3
  import skimage
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']
 
39
 
40
  4 - Proliferative DR
41
  """
42
+ article = """
43
+ <p style='text-align: center'>
44
+ <a href='https://www.kaggle.com/code/josemauriciodelgado/proliferative-retinopathy' target='_blank'>Kaggle Training Notebook</a> |
45
+ <a href='https://huggingface.co/jdelgado2002/diabetic_retinopathy_detection' target='_blank'>Model Card</a>
46
+ </p>
47
+ """
48
  # Get a list of all image paths in the test folder
49
  test_folder = "test" # replace with the actual path to your test folder
50
  image_paths = [os.path.join(test_folder, img) for img in os.listdir(test_folder) if img.endswith(('.png', '.jpg', '.jpeg'))]