epochs-demos commited on
Commit
5c1be38
1 Parent(s): 1c47dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +50 -13
app.py CHANGED
@@ -1,24 +1,61 @@
1
  import streamlit as st
2
  from PIL import Image
3
-
4
 
5
  # Add a title
6
  st.set_page_config(page_title="Select Diagnosis", layout="centered")
7
 
8
-
9
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  st.title("Medical Diagnosis App")
11
 
12
  st.markdown("")
13
- st.markdown("<li> Currently Brain Tumors , Xrays and Skin Leisons are ready for diagnosis </li>"
14
- "<li>The Models also explain what area in the images is the cause of diagnosis </li>"
15
- "<li>Currently the models are trained on a small dataset and will be trained on a larger dataset in the future</li>"
16
- '<li> The Application also provides generated information on how to diagnose the disease and what should the patient do in that case</li>'
17
- ,unsafe_allow_html=True)
 
 
18
 
19
  with st.sidebar.container():
20
- st.markdown("![Alt Text](https://media.giphy.com/media/Yp9Fi2moJ026Q/giphy.gif)")
21
-
22
-
23
-
24
-
 
1
  import streamlit as st
2
  from PIL import Image
3
+ import base64
4
 
5
  # Add a title
6
  st.set_page_config(page_title="Select Diagnosis", layout="centered")
7
 
8
+ with open("./logo.png", "rb") as f:
9
+ image_data = f.read()
10
+ image_base64 = base64.b64encode(image_data).decode("utf-8")
11
+
12
+ # Add custom CSS for the header
13
+ header_css = """
14
+ <style>
15
+ .header {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ padding: 20px;
20
+ font-size: 18px;
21
+ }
22
+
23
+ .header img {
24
+ margin-right: 10px;
25
+ width: 80px;
26
+ height: 50px;
27
+ }
28
+
29
+ .header p {
30
+ font-size: 14px;
31
+ }
32
+ </style>
33
+ """
34
+
35
+ # Render the custom CSS
36
+ st.markdown(header_css, unsafe_allow_html=True)
37
+
38
+ # Render the header
39
+ header_html = f"""
40
+ <div class="header">
41
+ <img src='data:image/jpeg;base64,{image_base64}' alt="Logo"/>
42
+ <p>Disclaimer: This web app is for demonstration purposes only and not intended for commercial use. Contact: contact@1001epochs.co.uk for full solution.</p>
43
+ </div>
44
+ """
45
+
46
+ st.markdown(header_html, unsafe_allow_html=True)
47
+
48
+ # Render the main content
49
  st.title("Medical Diagnosis App")
50
 
51
  st.markdown("")
52
+ st.markdown(
53
+ "<li> Currently Brain Tumors, X-rays, and Skin Lesions are ready for diagnosis </li>"
54
+ "<li>The Models also explain what area in the images is the cause of diagnosis </li>"
55
+ "<li>Currently, the models are trained on a small dataset and will be trained on a larger dataset in the future</li>"
56
+ '<li> The Application also provides generated information on how to diagnose the disease and what should the patient do in that case</li>',
57
+ unsafe_allow_html=True
58
+ )
59
 
60
  with st.sidebar.container():
61
+ st.image("https://media.giphy.com/media/Yp9Fi2moJ026Q/giphy.gif")