dqnguyen commited on
Commit
80c3c0f
1 Parent(s): 0114414

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -10,16 +10,16 @@ def predict(image):
10
  results = {}
11
  for p in predictions:
12
  if p["label"] == "MoHat":
13
- results["Granulation tissue (Mô hạt)"] = p["score"]
14
  elif p["label"] == "MoGiaMacNhiemKhuan":
15
- results["Pseudomembranous tissue with a bacterial infection (Mô giả mạc nhiễm khuẩn)"] = p["score"]
16
  elif p["label"] == "MoHoaiTu":
17
- results["Necrotic tissue (Mô hoại tử)"] = p["score"]
18
  return results
19
 
20
  gr.Interface(
21
  predict,
22
- inputs=gr.inputs.Image(label="Upload an image (Tải một bức ảnh vết loét tiểu đường)", type="filepath"),
23
  outputs=gr.outputs.Label(num_top_classes=5),
24
- title="Diabetic Ulcer Image Classification (Phân loại ảnh vết loét tiểu đường)",
25
  ).launch()
 
10
  results = {}
11
  for p in predictions:
12
  if p["label"] == "MoHat":
13
+ results["Granulation tissue"] = p["score"]
14
  elif p["label"] == "MoGiaMacNhiemKhuan":
15
+ results["Pseudomembranous tissue with a bacterial infection"] = p["score"]
16
  elif p["label"] == "MoHoaiTu":
17
+ results["Necrotic tissue"] = p["score"]
18
  return results
19
 
20
  gr.Interface(
21
  predict,
22
+ inputs=gr.inputs.Image(label="Upload a diabetic foot ulcer image", type="filepath"),
23
  outputs=gr.outputs.Label(num_top_classes=5),
24
+ title="Diabetic Foot Ulcer Image Classification",
25
  ).launch()