JohnAlexander23 commited on
Commit
4f8a663
1 Parent(s): d498cf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -39
app.py CHANGED
@@ -20,53 +20,53 @@ def fetch_response(user_input):
20
 
21
  # Streamlit app
22
  def main():
23
- # Layout with sidebar
24
- col1, col2 = st.columns([3, 1])
25
-
26
- with col1:
27
- # Header with logo (replace with custom logo CSS)
28
- st.markdown(
29
- """
30
- <h1 style="font-size: 2.5em; color: #3b5998">
31
- <span style="font-weight: bold;">AI</span> Chatbot
32
- </h1>
33
- """,
34
- unsafe_allow_html=True,
35
- )
36
-
37
- # Search bar (style as needed)
38
- with st.expander("Search", expanded=False):
39
- st.text_input("Search here...", key="search")
40
-
41
- # Question box
42
- user_question = st.text_area("Ask a question...", height=100)
43
-
44
- # Button to trigger response
45
- if st.button("Get Response"):
46
- response = fetch_response(user_question)
47
- st.write("Response:", response)
48
-
49
- with col2:
50
- # Sidebar header
51
- st.sidebar.header("Navigation")
52
-
53
- # Navigation buttons (style as needed)
54
- st.sidebar.button("Home", key="home")
55
- st.sidebar.button("Profile", key="profile")
56
- st.sidebar.button("Settings", key="settings")
57
 
58
- # Footer
59
  st.markdown(
60
  """
61
- <footer style="color: #3b5998; text-align: right;">
62
- <p>By DL Titans</p>
63
- </footer>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  """,
65
  unsafe_allow_html=True,
66
  )
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  if __name__ == "__main__":
70
  main()
71
 
72
-
 
20
 
21
  # Streamlit app
22
  def main():
23
+ st.set_page_config(
24
+ page_title="AI Chatbot",
25
+ page_icon=":robot:",
26
+ layout="wide", # Remove sidebars
27
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
+ # Custom background with CSS (adjust values for 3D effect)
30
  st.markdown(
31
  """
32
+ <style>
33
+ body {
34
+ background-color: #000;
35
+ background-image: linear-gradient(to right, #800080, #4B0082);
36
+ animation:
37
+ gradient 15s ease-in-out infinite alternate;
38
+ }
39
+
40
+ @keyframes gradient {
41
+ 0% {
42
+ background-position: 0% 0%;
43
+ }
44
+ 100% {
45
+ background-position: 100% 0%;
46
+ }
47
+ }
48
+ </style>
49
  """,
50
  unsafe_allow_html=True,
51
  )
52
 
53
+ # Title with futuristic font (replace with desired font)
54
+ st.title("AI Assistant", style="font-family: 'VT323'; color: #FF007F")
55
+
56
+ # Question box with rounded corners and glowing effect
57
+ user_question = st.text_area(
58
+ "Ask your question...", height=100, style="border-radius: 10px; box-shadow: 0 0 10px #FF007F"
59
+ )
60
+
61
+ # Button with hover effect
62
+ if st.button("Get Response", style="background-color: #4B0082; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; box-shadow: 0 0 5px #FF007F; transition: 0.3s ease; font-weight: bold"):
63
+ response = fetch_response(user_question)
64
+ st.write("Response:", response)
65
+
66
+ # Response box with a different color
67
+ st.write("", style="color: #C71585; font-size: 1.2em")
68
+
69
 
70
  if __name__ == "__main__":
71
  main()
72