Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def plt2arr(fig, draw=True):
|
|
| 19 |
return rgba_arr
|
| 20 |
|
| 21 |
def frame_size_width_mm(dropdown_label):
|
| 22 |
-
if dropdown_label == 'Small (
|
| 23 |
elif dropdown_label == 'Medium (xx mm)': frame_width_px = 150
|
| 24 |
elif dropdown_label == 'Large (xx mm)': frame_width_px = 155
|
| 25 |
return frame_width_px
|
|
@@ -43,6 +43,6 @@ def ipd_app(image,dropdown_label):
|
|
| 43 |
return text_ipd, frame_processed, str(measurements), sam_check_numpy
|
| 44 |
|
| 45 |
|
| 46 |
-
dropdown = gr.Dropdown(["Small (
|
| 47 |
demo = gr.Interface(fn=ipd_app, inputs=["image",dropdown], outputs=["text", "image", "text", "image"])
|
| 48 |
demo.launch(debug=True)
|
|
|
|
| 19 |
return rgba_arr
|
| 20 |
|
| 21 |
def frame_size_width_mm(dropdown_label):
|
| 22 |
+
if dropdown_label == 'Small (142 mm)': frame_width_px = 142
|
| 23 |
elif dropdown_label == 'Medium (xx mm)': frame_width_px = 150
|
| 24 |
elif dropdown_label == 'Large (xx mm)': frame_width_px = 155
|
| 25 |
return frame_width_px
|
|
|
|
| 43 |
return text_ipd, frame_processed, str(measurements), sam_check_numpy
|
| 44 |
|
| 45 |
|
| 46 |
+
dropdown = gr.Dropdown(["Small (142 mm)", "Medium (xx mm)", "Large (xx mm)"], label="Refractives Frame Size", info="For calibration")
|
| 47 |
demo = gr.Interface(fn=ipd_app, inputs=["image",dropdown], outputs=["text", "image", "text", "image"])
|
| 48 |
demo.launch(debug=True)
|