Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
import streamlit as st
|
3 |
from hazm import Normalizer, SentenceTokenizer
|
4 |
import os
|
@@ -538,8 +537,29 @@ def remove_stop_words_from_lines(lines, stop_words):
|
|
538 |
cleaned_lines.append(" ".join(cleaned_words))
|
539 |
return cleaned_lines
|
540 |
|
541 |
-
|
|
|
|
|
|
|
|
|
|
|
542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
if query:
|
544 |
|
545 |
thinking = st.empty()
|
@@ -587,7 +607,6 @@ if query:
|
|
587 |
st.markdown("""
|
588 |
<style>
|
589 |
@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');
|
590 |
-
|
591 |
div.chat-message {
|
592 |
font-family: 'Vazir', sans-serif;
|
593 |
font-size: 16px;
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from hazm import Normalizer, SentenceTokenizer
|
3 |
import os
|
|
|
537 |
cleaned_lines.append(" ".join(cleaned_words))
|
538 |
return cleaned_lines
|
539 |
|
540 |
+
st.markdown("""
|
541 |
+
<style>
|
542 |
+
@font-face {
|
543 |
+
font-family: 'BNazanin';
|
544 |
+
src: url('https://cdn.fontcdn.ir/Fonts/BNazanin.ttf') format('truetype');
|
545 |
+
}
|
546 |
|
547 |
+
div[data-testid="stChatInput"] {
|
548 |
+
font-family: 'BNazanin', sans-serif !important;
|
549 |
+
position: fixed;
|
550 |
+
bottom: 50px; /* مقدار پایینتر برای بالا آوردن باکس */
|
551 |
+
width: 100%;
|
552 |
+
z-index: 100;
|
553 |
+
}
|
554 |
+
|
555 |
+
input[type="text"] {
|
556 |
+
font-family: 'BNazanin', sans-serif !important;
|
557 |
+
font-size: 18px !important;
|
558 |
+
}
|
559 |
+
</style>
|
560 |
+
""", unsafe_allow_html=True)
|
561 |
+
|
562 |
+
query = st.chat_input("چطور میتونم کمک کنم؟")
|
563 |
if query:
|
564 |
|
565 |
thinking = st.empty()
|
|
|
607 |
st.markdown("""
|
608 |
<style>
|
609 |
@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');
|
|
|
610 |
div.chat-message {
|
611 |
font-family: 'Vazir', sans-serif;
|
612 |
font-size: 16px;
|