Spaces:
Sleeping
Sleeping
bigmed@bigmed
commited on
Commit
·
2cb8177
1
Parent(s):
edae4b7
added title and descreption, added predicted diagnosis
Browse files
app.py
CHANGED
@@ -103,8 +103,11 @@ def Final_Compute_regression_results_Sample(Model, batch_sampler,num_head=2):
|
|
103 |
|
104 |
# print('Vertical cup to disc ratio:')
|
105 |
# print(ratios.vcdr)
|
106 |
-
if
|
107 |
-
glaucoma = '
|
|
|
|
|
|
|
108 |
# print('Galucoma:')
|
109 |
|
110 |
|
@@ -137,8 +140,8 @@ def infer(img):
|
|
137 |
return ratio, diagnosis, result, cropped
|
138 |
|
139 |
|
140 |
-
title = "Glaucoma
|
141 |
-
description = "
|
142 |
|
143 |
outputs = [gr.Textbox(label="Vertical cup to disc ratio:"), gr.Textbox(label="predicted diagnosis"), gr.Image(label='labeled image'), gr.Image(label='zoomed in')]
|
144 |
with gr.Blocks(css='#title {text-align : center;} ') as demo:
|
@@ -160,8 +163,8 @@ with gr.Blocks(css='#title {text-align : center;} ') as demo:
|
|
160 |
inputs=[prompt], fn=infer, outputs=[outputs], cache_examples=False)
|
161 |
with gr.Column():
|
162 |
with gr.Row():
|
163 |
-
text1 = gr.Textbox(label="Vertical
|
164 |
-
text2 = gr.Textbox(label="
|
165 |
img = gr.Image(label='labeled image')
|
166 |
zoom = gr.Image(label='zoomed in')
|
167 |
|
|
|
103 |
|
104 |
# print('Vertical cup to disc ratio:')
|
105 |
# print(ratios.vcdr)
|
106 |
+
if ratios.vcdr < 0.6:
|
107 |
+
glaucoma = 'None (Rule of thumb ~0.6 or greater is suspicious)'
|
108 |
+
else:
|
109 |
+
glaucoma = 'There May be a risk of Glaucoma (Rule of thumb ~0.6 or greater is suspicious)'
|
110 |
+
|
111 |
# print('Galucoma:')
|
112 |
|
113 |
|
|
|
140 |
return ratio, diagnosis, result, cropped
|
141 |
|
142 |
|
143 |
+
title = "Glaucoma Detection in Retinal Fundus Images"
|
144 |
+
description = "The method detects disc and cup in the retinal image, then it computes the Vertical cup to disc ratio"
|
145 |
|
146 |
outputs = [gr.Textbox(label="Vertical cup to disc ratio:"), gr.Textbox(label="predicted diagnosis"), gr.Image(label='labeled image'), gr.Image(label='zoomed in')]
|
147 |
with gr.Blocks(css='#title {text-align : center;} ') as demo:
|
|
|
163 |
inputs=[prompt], fn=infer, outputs=[outputs], cache_examples=False)
|
164 |
with gr.Column():
|
165 |
with gr.Row():
|
166 |
+
text1 = gr.Textbox(label="Vertical Cup to Disc Ratio:")
|
167 |
+
text2 = gr.Textbox(label="Predicted Diagnosis")
|
168 |
img = gr.Image(label='labeled image')
|
169 |
zoom = gr.Image(label='zoomed in')
|
170 |
|