ipd adevula1 commited on
Commit
f9ca340
1 Parent(s): 0443631

Update app.py (#2)

Browse files

- Update app.py (34faa5e0e9e33e7fd874e3c222a2eadbd6220135)


Co-authored-by: Aneesh D <[email protected]>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -38,7 +38,7 @@ def predict(Image):
38
 
39
  with torch.no_grad():
40
  grade = torch.softmax(model(img.float()), dim=1)[0]
41
- category = ["Normal", "Mild", "Moderate", "Severe", "Proliferative"]
42
  output_dict = {}
43
  for cat, value in zip(category, grade):
44
  output_dict[cat] = value.item()
@@ -55,6 +55,7 @@ demo = gr.Interface(
55
  inputs=image,
56
  outputs=label,
57
  #examples=["examples/0.png", "examples/1.png", "examples/2.png", "examples/3.png", "examples/4.png"]
 
58
  )
59
 
60
  if __name__ == "__main__":
 
38
 
39
  with torch.no_grad():
40
  grade = torch.softmax(model(img.float()), dim=1)[0]
41
+ category = ["0 - Normal", "1 - Mild", "2 - Moderate", "3 - Severe", "4 - Proliferative"]
42
  output_dict = {}
43
  for cat, value in zip(category, grade):
44
  output_dict[cat] = value.item()
 
55
  inputs=image,
56
  outputs=label,
57
  #examples=["examples/0.png", "examples/1.png", "examples/2.png", "examples/3.png", "examples/4.png"]
58
+ examples=["0.png", "2.png", "4.png"]
59
  )
60
 
61
  if __name__ == "__main__":