fknuette commited on
Commit
268a066
·
1 Parent(s): e557b47

first draft of frontend

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +13 -4
src/streamlit_app.py CHANGED
@@ -32,7 +32,7 @@ st.markdown(page_bg_img, unsafe_allow_html=True)
32
 
33
 
34
 
35
- st.set_page_config(page_title="A different kind of application", layout="centered")
36
 
37
  if "splash_done" not in st.session_state:
38
  st.session_state.splash_done = False
@@ -92,15 +92,16 @@ if not st.session_state.splash_done:
92
  st.markdown(splash_html, unsafe_allow_html=True)
93
  time.sleep(2)
94
  st.session_state.splash_done = True
95
- st.rerun() # -> Seite neu laden, danach kein Splash mehr
96
  else:
97
 
98
- st.set_page_config(layout="centered")
99
 
100
  if "messages" not in st.session_state:
101
  st.session_state.messages = []
102
-
103
  user_input = st.chat_input("Write someting...")
 
104
 
105
  if user_input:
106
  st.session_state.messages.append(("user", user_input))
@@ -124,7 +125,15 @@ else:
124
  }
125
  .user { background: rgba(68, 68, 68); color: white; margin-left: auto; }
126
  .bot { background: rgba(221, 221, 221); color: black; margin-right: auto; }
 
 
 
 
127
 
 
 
 
 
128
  @keyframes slidein {
129
  from { transform: translateY(20px); opacity: 0; }
130
  to { transform: translateY(0); opacity: 1; }
 
32
 
33
 
34
 
35
+
36
 
37
  if "splash_done" not in st.session_state:
38
  st.session_state.splash_done = False
 
92
  st.markdown(splash_html, unsafe_allow_html=True)
93
  time.sleep(2)
94
  st.session_state.splash_done = True
95
+ st.rerun()
96
  else:
97
 
98
+ st.set_page_config(page_title="A different kind of application", layout="centered")
99
 
100
  if "messages" not in st.session_state:
101
  st.session_state.messages = []
102
+
103
  user_input = st.chat_input("Write someting...")
104
+
105
 
106
  if user_input:
107
  st.session_state.messages.append(("user", user_input))
 
125
  }
126
  .user { background: rgba(68, 68, 68); color: white; margin-left: auto; }
127
  .bot { background: rgba(221, 221, 221); color: black; margin-right: auto; }
128
+ .user::before {
129
+ content: "👤 ";
130
+ margin-right: 6px;
131
+ }
132
 
133
+ .bot::before {
134
+ content: "🤖 ";
135
+ margin-right: 6px;
136
+ }
137
  @keyframes slidein {
138
  from { transform: translateY(20px); opacity: 0; }
139
  to { transform: translateY(0); opacity: 1; }