Jfink09 commited on
Commit
dc21578
·
verified ·
1 Parent(s): 0bf6916

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -76,25 +76,23 @@ def main():
76
  predicted_axis += 180
77
 
78
  # Display results in a green success box
79
- st.success(f'''
80
- Predicted Total Corneal Astigmatism Magnitude: {predicted_magnitude:.2f} D
81
- Predicted Total Corneal Astigmatism Axis: {predicted_axis:.1f}°
82
- ''')
83
 
84
  # Display intermediate values for verification
85
- st.info(f'''
86
- Input ACA - Magnitude: {aca_magnitude:.2f} D, Axis: {aca_axis:.1f}°
87
- Initial J0: {initial_j0:.2f}, Initial J45: {initial_j45:.2f}
88
- Predicted J0: {new_j0:.2f}, Predicted J45: {new_j45:.2f}
89
- ''')
90
 
91
  # Additional debugging information (optional)
92
- if st.checkbox('Show detailed model inputs and outputs'):
93
- st.subheader('Debugging Information:')
94
- st.write(f"Input tensor for J0: {torch.tensor([[age, aca_axis, initial_j0]], dtype=torch.float32)}")
95
- st.write(f"Input tensor for J45: {torch.tensor([[age, aca_axis, initial_j45]], dtype=torch.float32)}")
96
- st.write(f"Raw J0 output: {new_j0}")
97
- st.write(f"Raw J45 output: {new_j45}")
98
  else:
99
  st.error('Please ensure all inputs are within the specified ranges.')
100
 
 
76
  predicted_axis += 180
77
 
78
  # Display results in a green success box
79
+ st.success(f'Predicted Total Corneal Astigmatism Magnitude: {predicted_magnitude:.2f} D')
80
+ st.success(f'Predicted Total Corneal Astigmatism Axis: {predicted_axis:.1f}°')
 
 
81
 
82
  # Display intermediate values for verification
83
+ #st.info(f'''
84
+ #Input ACA - Magnitude: {aca_magnitude:.2f} D, Axis: {aca_axis:.1f}°
85
+ #Initial J0: {initial_j0:.2f}, Initial J45: {initial_j45:.2f}
86
+ #Predicted J0: {new_j0:.2f}, Predicted J45: {new_j45:.2f}
87
+ #''')
88
 
89
  # Additional debugging information (optional)
90
+ #if st.checkbox('Show detailed model inputs and outputs'):
91
+ #st.subheader('Debugging Information:')
92
+ #st.write(f"Input tensor for J0: {torch.tensor([[age, aca_axis, initial_j0]], dtype=torch.float32)}")
93
+ #st.write(f"Input tensor for J45: {torch.tensor([[age, aca_axis, initial_j45]], dtype=torch.float32)}")
94
+ #st.write(f"Raw J0 output: {new_j0}")
95
+ #st.write(f"Raw J45 output: {new_j45}")
96
  else:
97
  st.error('Please ensure all inputs are within the specified ranges.')
98