SaileshSivan commited on
Commit
b9ec415
·
1 Parent(s): 0664275

added some style to the webpage.

Browse files
Files changed (1) hide show
  1. app.py +25 -4
app.py CHANGED
@@ -29,8 +29,26 @@ def get_chatmodel_response(question):
29
  return None
30
 
31
  # Streamlit app setup
32
- st.set_page_config(page_title="Doctor AI")
33
- st.header("Hello, I'm a Doctor AI. how can I help you?")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  from dotenv import load_dotenv
36
  load_dotenv()
@@ -45,11 +63,14 @@ if 'flowmessages' not in st.session_state:
45
  ]
46
 
47
  # Streamlit UI
48
- input_question = st.text_input("Type here.", key="input")
49
- submit = st.button("Submit")
 
50
 
51
  # If the "Ask" button is clicked
52
  if submit:
 
 
53
  response = get_chatmodel_response(input_question)
54
 
55
  if response is not None:
 
29
  return None
30
 
31
  # Streamlit app setup
32
+ st.set_page_config(page_title="Doctor AI", page_icon="💊", layout="centered", initial_sidebar_state="collapsed")
33
+ # Set page background
34
+ st.markdown(
35
+ """
36
+ <style>
37
+ body {
38
+ background-color: #f0f0f0; /* Set your desired background color */
39
+ }
40
+ .stTextInput, .stButton {
41
+ border-radius: 10px; /* Add border-radius for a nicer input bar */
42
+ padding: 10px; /* Adjust padding for better spacing */
43
+ }
44
+ </style>
45
+ """,
46
+ unsafe_allow_html=True
47
+ )
48
+
49
+
50
+
51
+ st.header("Hello, I'm a Doctor AI. How can I help you?")
52
 
53
  from dotenv import load_dotenv
54
  load_dotenv()
 
63
  ]
64
 
65
  # Streamlit UI
66
+ # Streamlit UI with styled input bars
67
+ input_question = st.text_input("Type here.", key="input", class="stTextInput")
68
+ submit = st.button("Submit", class="stButton")
69
 
70
  # If the "Ask" button is clicked
71
  if submit:
72
+ # Display loading message while processing
73
+ with st.spinner("Analyzing..."):
74
  response = get_chatmodel_response(input_question)
75
 
76
  if response is not None: