bhimrazy commited on
Commit
e41012f
1 Parent(s): 8652b41

Updates description

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -5,6 +5,7 @@ from torchvision import transforms as T
5
 
6
  CHECKPOINT_PATH = "artifacts/dr-model.ckpt"
7
  model = DRModel.load_from_checkpoint(CHECKPOINT_PATH)
 
8
 
9
  labels = {
10
  0: "No DR",
@@ -22,6 +23,7 @@ transform = T.Compose(
22
  ]
23
  )
24
 
 
25
  # Define the prediction function
26
  def predict(input_img):
27
  input_img = transform(input_img).unsqueeze(0)
@@ -36,7 +38,10 @@ dr_app = gr.Interface(
36
  fn=predict,
37
  inputs=gr.Image(type="pil"),
38
  outputs=gr.Label(),
39
- title="Diabetic Retinopathy Detection",
 
 
 
40
  examples=[
41
  "data/sample/10_left.jpeg",
42
  "data/sample/10_right.jpeg",
 
5
 
6
  CHECKPOINT_PATH = "artifacts/dr-model.ckpt"
7
  model = DRModel.load_from_checkpoint(CHECKPOINT_PATH)
8
+ model.eval()
9
 
10
  labels = {
11
  0: "No DR",
 
23
  ]
24
  )
25
 
26
+
27
  # Define the prediction function
28
  def predict(input_img):
29
  input_img = transform(input_img).unsqueeze(0)
 
38
  fn=predict,
39
  inputs=gr.Image(type="pil"),
40
  outputs=gr.Label(),
41
+ title="Diabetic Retinopathy Detection App",
42
+ description="Welcome to our Diabetic Retinopathy Detection App! \
43
+ This app utilizes deep learning models to detect diabetic retinopathy in retinal images.\
44
+ Diabetic retinopathy is a common complication of diabetes and early detection is crucial for effective treatment.",
45
  examples=[
46
  "data/sample/10_left.jpeg",
47
  "data/sample/10_right.jpeg",