aaravlovescodes commited on
Commit
65847f9
·
verified ·
1 Parent(s): 6dd23d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -12
app.py CHANGED
@@ -13,10 +13,10 @@ warnings.filterwarnings("ignore")
13
  os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
14
 
15
  st.set_page_config(
16
- page_title="PNEUMONIA Disease Detection",
17
- page_icon=":skull:",
18
- initial_sidebar_state="auto",
19
- )
20
 
21
  hide_streamlit_style = """
22
  <style>
@@ -34,11 +34,19 @@ def prediction_cls(prediction):
34
 
35
 
36
  with st.sidebar:
37
- # st.image("mg.png")
38
- st.title("Disease Detection")
39
- st.markdown(
40
- "Accurate detection of diseases present in the X-Ray. This helps an user to easily detect the disease and identify it's cause."
41
- )
 
 
 
 
 
 
 
 
42
  st.set_option("deprecation.showfileUploaderEncoding", False)
43
 
44
 
@@ -72,9 +80,6 @@ else:
72
  image = keras.preprocessing.image.load_img(file, target_size=(224, 224), color_mode='rgb')
73
  st.image(image, caption="Uploaded Image.", use_column_width=True)
74
  predictions = import_and_predict(image, model)
75
- np.random.seed(42)
76
- x = random.randint(98, 99) + random.randint(0, 99) * 0.01
77
- st.error("Accuracy : " + str(x) + " %")
78
  print(predictions)
79
  class_names = [
80
  "Normal",
 
13
  os.environ['TF_ENABLE_ONEDNN_OPTS'] = '0'
14
 
15
  st.set_page_config(
16
+ page_title="ChestAI - Pneumonia Detection",
17
+ page_icon="🫁",
18
+ initial_sidebar_state="expanded"
19
+ )
20
 
21
  hide_streamlit_style = """
22
  <style>
 
34
 
35
 
36
  with st.sidebar:
37
+ st.title("👋 Welcome to ChestAI")
38
+ st.markdown("""
39
+ ### About
40
+ ChestAI uses advanced deep learning to detect pneumonia in chest X-rays.
41
+
42
+ ### How to use
43
+ 1. Upload a chest X-ray image (JPG/PNG)
44
+ 2. Wait for the analysis
45
+ 3. View the results and confidence score
46
+
47
+ ### Note
48
+ This tool is for educational purposes only. Always consult healthcare professionals for medical advice.
49
+ """)
50
  st.set_option("deprecation.showfileUploaderEncoding", False)
51
 
52
 
 
80
  image = keras.preprocessing.image.load_img(file, target_size=(224, 224), color_mode='rgb')
81
  st.image(image, caption="Uploaded Image.", use_column_width=True)
82
  predictions = import_and_predict(image, model)
 
 
 
83
  print(predictions)
84
  class_names = [
85
  "Normal",