JadAssaf commited on
Commit
bb1c225
·
1 Parent(s): a7aa8c2
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -12,7 +12,7 @@ def Zernike(z1,z2,z3,z4,z5,z6,z7):
12
  X = [z1,z2,z3,z4,z5,z6,z7]
13
  print(X)
14
  outcome_decoded = ['Normal','Borderline','Suspicious','Keratoconic']
15
- file_object = open('stpi_data.txt', 'a')
16
  file_object.write(str(z1))
17
  file_object.write(';')
18
  file_object.write(str(z2))
@@ -28,14 +28,13 @@ def Zernike(z1,z2,z3,z4,z5,z6,z7):
28
  file_object.write('\n')
29
  file_object.close()
30
 
31
- result_3way = model.predict([X])
32
- return 'The patient is ' + outcome_decoded[int(result_3way)] + '.'
33
 
34
  iface = gr.Interface(
35
  fn=Zernike,
36
  title='Awwad-Versaci Keratoconus Index',
37
  description='The Awwad-Versaci Keratoconus Index (AVKI) detects keratoconus and keratoconus susceptible corneas through pachymetry maps centered on the thinnest point and fitted into Zernike polynomials. Beta version by Shady Awwad, Anthony Abou Mrad, MD, Jad Assaf, MD, and Francesco Versaci, PhD. This is the 4-way classification. The Zernke polynomials were taken from the 4mm cornea centered on the thinnest point the selected polynomials are z(0,0) z(1,-1) z(2,0) z(3,-1) z(4,0) z(6,0) z(7,-1) from highest ROC curves',
38
- # inputs=["number", "number","number", "number", "number","number"],
39
  inputs=[
40
  gr.inputs.Number(label="z(0,0)"),
41
  gr.inputs.Number(label="z(1,-1)"),
 
12
  X = [z1,z2,z3,z4,z5,z6,z7]
13
  print(X)
14
  outcome_decoded = ['Normal','Borderline','Suspicious','Keratoconic']
15
+ file_object = open('zernike_data.txt', 'a')
16
  file_object.write(str(z1))
17
  file_object.write(';')
18
  file_object.write(str(z2))
 
28
  file_object.write('\n')
29
  file_object.close()
30
 
31
+ result = model.predict([X])
32
+ return 'The patient is ' + outcome_decoded[int(result)] + '.'
33
 
34
  iface = gr.Interface(
35
  fn=Zernike,
36
  title='Awwad-Versaci Keratoconus Index',
37
  description='The Awwad-Versaci Keratoconus Index (AVKI) detects keratoconus and keratoconus susceptible corneas through pachymetry maps centered on the thinnest point and fitted into Zernike polynomials. Beta version by Shady Awwad, Anthony Abou Mrad, MD, Jad Assaf, MD, and Francesco Versaci, PhD. This is the 4-way classification. The Zernke polynomials were taken from the 4mm cornea centered on the thinnest point the selected polynomials are z(0,0) z(1,-1) z(2,0) z(3,-1) z(4,0) z(6,0) z(7,-1) from highest ROC curves',
 
38
  inputs=[
39
  gr.inputs.Number(label="z(0,0)"),
40
  gr.inputs.Number(label="z(1,-1)"),