Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import streamlit as st
|
|
5 |
import os
|
6 |
from urllib.parse import urlencode, urlparse, parse_qs
|
7 |
|
8 |
-
st.set_page_config(page_title="
|
9 |
|
10 |
# ==== MÔI TRƯỜNG OAuth ====
|
11 |
FB_APP_ID = os.getenv("FB_APP_ID")
|
@@ -47,7 +47,7 @@ if 'messages' not in st.session_state:
|
|
47 |
|
48 |
# st.markdown(f"""
|
49 |
# <div class=logo_area>
|
50 |
-
# <img src="./app/static/
|
51 |
# </div>
|
52 |
# """, unsafe_allow_html=True)
|
53 |
# st.markdown("<h2 style='text-align: center;'>ViBidLQA</h2>", unsafe_allow_html=True)
|
@@ -155,7 +155,7 @@ for message in st.session_state.messages:
|
|
155 |
if message['role'] == 'assistant':
|
156 |
avatar_class = "assistant-avatar"
|
157 |
message_class = "assistant-message"
|
158 |
-
avatar = './app/static/
|
159 |
else:
|
160 |
avatar_class = ""
|
161 |
message_class = "user-message"
|
@@ -196,7 +196,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
196 |
full_response = abs_answer
|
197 |
message_placeholder.markdown(f"""
|
198 |
<div class="assistant-message">
|
199 |
-
<img src="./app/static/
|
200 |
<div class="stMarkdown">{full_response}</div>
|
201 |
</div>
|
202 |
""", unsafe_allow_html=True)
|
@@ -217,7 +217,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
217 |
|
218 |
message_placeholder.markdown(f"""
|
219 |
<div class="assistant-message">
|
220 |
-
<img src="./app/static/
|
221 |
<div class="stMarkdown">{full_response}●</div>
|
222 |
</div>
|
223 |
""", unsafe_allow_html=True)
|
@@ -237,7 +237,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
237 |
full_response = answer
|
238 |
message_placeholder.markdown(f"""
|
239 |
<div class="assistant-message">
|
240 |
-
<img src="./app/static/
|
241 |
<div class="stMarkdown">{full_response}</div>
|
242 |
</div>
|
243 |
""", unsafe_allow_html=True)
|
@@ -258,7 +258,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
258 |
|
259 |
message_placeholder.markdown(f"""
|
260 |
<div class="assistant-message">
|
261 |
-
<img src="./app/static/
|
262 |
<div class="stMarkdown">{full_response}●</div>
|
263 |
</div>
|
264 |
""", unsafe_allow_html=True)
|
@@ -273,7 +273,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
273 |
full_response = answer
|
274 |
message_placeholder.markdown(f"""
|
275 |
<div class="assistant-message">
|
276 |
-
<img src="./app/static/
|
277 |
<div class="stMarkdown">{full_response}</div>
|
278 |
</div>
|
279 |
""", unsafe_allow_html=True)
|
@@ -294,7 +294,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
294 |
|
295 |
message_placeholder.markdown(f"""
|
296 |
<div class="assistant-message">
|
297 |
-
<img src="./app/static/
|
298 |
<div class="stMarkdown">{full_response}●</div>
|
299 |
</div>
|
300 |
""", unsafe_allow_html=True)
|
@@ -304,7 +304,7 @@ if prompt := st.chat_input(placeholder='Tôi có thể giúp được gì cho b
|
|
304 |
|
305 |
message_placeholder.markdown(f"""
|
306 |
<div class="assistant-message">
|
307 |
-
<img src="./app/static/
|
308 |
<div class="stMarkdown">
|
309 |
{full_response}
|
310 |
</div>
|
|
|
5 |
import os
|
6 |
from urllib.parse import urlencode, urlparse, parse_qs
|
7 |
|
8 |
+
st.set_page_config(page_title="IntelliChat - Trợ lý AI văn bản pháp luật Việt Nam", page_icon="./app/static/IntelliChat.png", layout="centered", initial_sidebar_state="collapsed")
|
9 |
|
10 |
# ==== MÔI TRƯỜNG OAuth ====
|
11 |
FB_APP_ID = os.getenv("FB_APP_ID")
|
|
|
47 |
|
48 |
# st.markdown(f"""
|
49 |
# <div class=logo_area>
|
50 |
+
# <img src="./app/static/IntelliChat.png"/>
|
51 |
# </div>
|
52 |
# """, unsafe_allow_html=True)
|
53 |
# st.markdown("<h2 style='text-align: center;'>ViBidLQA</h2>", unsafe_allow_html=True)
|
|
|
155 |
if message['role'] == 'assistant':
|
156 |
avatar_class = "assistant-avatar"
|
157 |
message_class = "assistant-message"
|
158 |
+
avatar = './app/static/IntelliChat.png'
|
159 |
else:
|
160 |
avatar_class = ""
|
161 |
message_class = "user-message"
|
|
|
196 |
full_response = abs_answer
|
197 |
message_placeholder.markdown(f"""
|
198 |
<div class="assistant-message">
|
199 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
200 |
<div class="stMarkdown">{full_response}</div>
|
201 |
</div>
|
202 |
""", unsafe_allow_html=True)
|
|
|
217 |
|
218 |
message_placeholder.markdown(f"""
|
219 |
<div class="assistant-message">
|
220 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
221 |
<div class="stMarkdown">{full_response}●</div>
|
222 |
</div>
|
223 |
""", unsafe_allow_html=True)
|
|
|
237 |
full_response = answer
|
238 |
message_placeholder.markdown(f"""
|
239 |
<div class="assistant-message">
|
240 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
241 |
<div class="stMarkdown">{full_response}</div>
|
242 |
</div>
|
243 |
""", unsafe_allow_html=True)
|
|
|
258 |
|
259 |
message_placeholder.markdown(f"""
|
260 |
<div class="assistant-message">
|
261 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
262 |
<div class="stMarkdown">{full_response}●</div>
|
263 |
</div>
|
264 |
""", unsafe_allow_html=True)
|
|
|
273 |
full_response = answer
|
274 |
message_placeholder.markdown(f"""
|
275 |
<div class="assistant-message">
|
276 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
277 |
<div class="stMarkdown">{full_response}</div>
|
278 |
</div>
|
279 |
""", unsafe_allow_html=True)
|
|
|
294 |
|
295 |
message_placeholder.markdown(f"""
|
296 |
<div class="assistant-message">
|
297 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
298 |
<div class="stMarkdown">{full_response}●</div>
|
299 |
</div>
|
300 |
""", unsafe_allow_html=True)
|
|
|
304 |
|
305 |
message_placeholder.markdown(f"""
|
306 |
<div class="assistant-message">
|
307 |
+
<img src="./app/static/IntelliChat.png" class="assistant-avatar" />
|
308 |
<div class="stMarkdown">
|
309 |
{full_response}
|
310 |
</div>
|