adithiyyha commited on
Commit
26923aa
Β·
verified Β·
1 Parent(s): 171239b

Update icd9_ui.py

Browse files
Files changed (1) hide show
  1. icd9_ui.py +22 -22
icd9_ui.py CHANGED
@@ -288,27 +288,27 @@
288
  # return predictions_with_desc
289
 
290
  # Streamlit UI
291
- st.title("Medical Diagnosis Assistant")
292
- option = st.selectbox(
293
- "Choose Diagnosis Method",
294
- ("ICD-9 Code Prediction", "Medical Image Analysis")
295
- )
296
-
297
- # ICD-9 Code Prediction
298
- if option == "ICD-9 Code Prediction":
299
- st.write("### Enter Medical Summary")
300
- input_text = st.text_area("Medical Summary", placeholder="Enter clinical notes here...")
301
-
302
- threshold = st.slider("Prediction Threshold", 0.0, 1.0, 0.5, 0.01)
303
-
304
- if st.button("Predict ICD-9 Codes"):
305
- if input_text.strip():
306
- predictions = predict_icd9([input_text], tokenizer, model, threshold)
307
- st.write("### Predicted ICD-9 Codes and Descriptions")
308
- for code, description in predictions[0]:
309
- st.write(f"- {code}: {description}")
310
- else:
311
- st.error("Please enter a medical summary.")
312
 
313
  # Medical Image Analysis
314
  # elif option == "Medical Image Analysis":
@@ -402,7 +402,7 @@ if option == "ICD-9 Code Prediction":
402
  # else:
403
  # st.info("πŸ‘† Please upload a medical image to begin analysis")
404
 
405
- import os
406
  import torch
407
  import pandas as pd
408
  import streamlit as st
 
288
  # return predictions_with_desc
289
 
290
  # Streamlit UI
291
+ # st.title("Medical Diagnosis Assistant")
292
+ # option = st.selectbox(
293
+ # "Choose Diagnosis Method",
294
+ # ("ICD-9 Code Prediction", "Medical Image Analysis")
295
+ # )
296
+
297
+ # # ICD-9 Code Prediction
298
+ # if option == "ICD-9 Code Prediction":
299
+ # st.write("### Enter Medical Summary")
300
+ # input_text = st.text_area("Medical Summary", placeholder="Enter clinical notes here...")
301
+
302
+ # threshold = st.slider("Prediction Threshold", 0.0, 1.0, 0.5, 0.01)
303
+
304
+ # if st.button("Predict ICD-9 Codes"):
305
+ # if input_text.strip():
306
+ # predictions = predict_icd9([input_text], tokenizer, model, threshold)
307
+ # st.write("### Predicted ICD-9 Codes and Descriptions")
308
+ # for code, description in predictions[0]:
309
+ # st.write(f"- {code}: {description}")
310
+ # else:
311
+ # st.error("Please enter a medical summary.")
312
 
313
  # Medical Image Analysis
314
  # elif option == "Medical Image Analysis":
 
402
  # else:
403
  # st.info("πŸ‘† Please upload a medical image to begin analysis")
404
 
405
+ import os
406
  import torch
407
  import pandas as pd
408
  import streamlit as st