Update app.py
Browse files
app.py
CHANGED
@@ -12,25 +12,38 @@ from typing import List
|
|
12 |
from together import Together
|
13 |
|
14 |
|
15 |
-
st.set_page_config(page_title="چت بات
|
16 |
|
17 |
-
st.markdown("""
|
18 |
<style>
|
19 |
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');
|
20 |
|
21 |
-
html, body, [class*="css"] {
|
22 |
font-family: 'Vazirmatn', Tahoma, sans-serif;
|
23 |
direction: rtl;
|
24 |
text-align: right;
|
25 |
-
}
|
26 |
|
27 |
-
.stApp {
|
28 |
background: url("./military_bg.jpeg") no-repeat center center fixed;
|
29 |
background-size: cover;
|
30 |
backdrop-filter: blur(2px);
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
.stChatMessage {
|
34 |
background-color: rgba(255,255,255,0.8);
|
35 |
border: 1px solid #4e8a3e;
|
36 |
border-radius: 12px;
|
@@ -38,30 +51,30 @@ st.markdown("""
|
|
38 |
margin-bottom: 15px;
|
39 |
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
|
40 |
animation: fadeIn 0.4s ease-in-out;
|
41 |
-
}
|
42 |
|
43 |
-
.stTextInput > div > input, .stTextArea textarea {
|
44 |
background-color: rgba(255,255,255,0.9) !important;
|
45 |
border-radius: 8px !important;
|
46 |
direction: rtl;
|
47 |
text-align: right;
|
48 |
font-family: 'Vazirmatn', Tahoma;
|
49 |
-
}
|
50 |
|
51 |
-
.stButton>button {
|
52 |
background-color: #4e8a3e !important;
|
53 |
color: white !important;
|
54 |
font-weight: bold;
|
55 |
border-radius: 10px;
|
56 |
padding: 8px 20px;
|
57 |
transition: 0.3s;
|
58 |
-
}
|
59 |
|
60 |
-
.stButton>button:hover {
|
61 |
background-color: #3c6d30 !important;
|
62 |
-
}
|
63 |
|
64 |
-
.header-text {
|
65 |
text-align: center;
|
66 |
margin-top: 20px;
|
67 |
margin-bottom: 40px;
|
@@ -69,35 +82,39 @@ st.markdown("""
|
|
69 |
padding: 20px;
|
70 |
border-radius: 20px;
|
71 |
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
72 |
-
}
|
73 |
|
74 |
-
.header-text h1 {
|
75 |
font-size: 42px;
|
76 |
color: #2c3e50;
|
77 |
margin: 0;
|
78 |
font-weight: bold;
|
79 |
-
}
|
80 |
|
81 |
-
.subtitle {
|
82 |
font-size: 18px;
|
83 |
color: #34495e;
|
84 |
margin-top: 8px;
|
85 |
-
}
|
86 |
|
87 |
-
@keyframes fadeIn {
|
88 |
-
from { opacity: 0; transform: translateY(10px); }
|
89 |
-
to { opacity: 1; transform: translateY(0); }
|
90 |
-
}
|
91 |
</style>
|
92 |
""", unsafe_allow_html=True)
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
97 |
|
|
|
98 |
st.markdown("""
|
99 |
<div class="header-text">
|
100 |
-
<h1>چت بات
|
101 |
<div class="subtitle">دستیار هوشمند برای تصمیمگیری در میدان نبرد</div>
|
102 |
</div>
|
103 |
""", unsafe_allow_html=True)
|
|
|
12 |
from together import Together
|
13 |
|
14 |
|
15 |
+
st.set_page_config(page_title="چت بات ارتش", page_icon="🪖", layout="wide")
|
16 |
|
17 |
+
st.markdown(f"""
|
18 |
<style>
|
19 |
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');
|
20 |
|
21 |
+
html, body, [class*="css"] {{
|
22 |
font-family: 'Vazirmatn', Tahoma, sans-serif;
|
23 |
direction: rtl;
|
24 |
text-align: right;
|
25 |
+
}}
|
26 |
|
27 |
+
.stApp {{
|
28 |
background: url("./military_bg.jpeg") no-repeat center center fixed;
|
29 |
background-size: cover;
|
30 |
backdrop-filter: blur(2px);
|
31 |
+
}}
|
32 |
+
|
33 |
+
.logo-container {{
|
34 |
+
display: flex;
|
35 |
+
justify-content: center;
|
36 |
+
align-items: center;
|
37 |
+
margin-top: 30px;
|
38 |
+
}}
|
39 |
+
|
40 |
+
.logo-container img {{
|
41 |
+
width: 240px;
|
42 |
+
border-radius: 10px;
|
43 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.25);
|
44 |
+
}}
|
45 |
|
46 |
+
.stChatMessage {{
|
47 |
background-color: rgba(255,255,255,0.8);
|
48 |
border: 1px solid #4e8a3e;
|
49 |
border-radius: 12px;
|
|
|
51 |
margin-bottom: 15px;
|
52 |
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
|
53 |
animation: fadeIn 0.4s ease-in-out;
|
54 |
+
}}
|
55 |
|
56 |
+
.stTextInput > div > input, .stTextArea textarea {{
|
57 |
background-color: rgba(255,255,255,0.9) !important;
|
58 |
border-radius: 8px !important;
|
59 |
direction: rtl;
|
60 |
text-align: right;
|
61 |
font-family: 'Vazirmatn', Tahoma;
|
62 |
+
}}
|
63 |
|
64 |
+
.stButton>button {{
|
65 |
background-color: #4e8a3e !important;
|
66 |
color: white !important;
|
67 |
font-weight: bold;
|
68 |
border-radius: 10px;
|
69 |
padding: 8px 20px;
|
70 |
transition: 0.3s;
|
71 |
+
}}
|
72 |
|
73 |
+
.stButton>button:hover {{
|
74 |
background-color: #3c6d30 !important;
|
75 |
+
}}
|
76 |
|
77 |
+
.header-text {{
|
78 |
text-align: center;
|
79 |
margin-top: 20px;
|
80 |
margin-bottom: 40px;
|
|
|
82 |
padding: 20px;
|
83 |
border-radius: 20px;
|
84 |
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
85 |
+
}}
|
86 |
|
87 |
+
.header-text h1 {{
|
88 |
font-size: 42px;
|
89 |
color: #2c3e50;
|
90 |
margin: 0;
|
91 |
font-weight: bold;
|
92 |
+
}}
|
93 |
|
94 |
+
.subtitle {{
|
95 |
font-size: 18px;
|
96 |
color: #34495e;
|
97 |
margin-top: 8px;
|
98 |
+
}}
|
99 |
|
100 |
+
@keyframes fadeIn {{
|
101 |
+
from {{ opacity: 0; transform: translateY(10px); }}
|
102 |
+
to {{ opacity: 1; transform: translateY(0); }}
|
103 |
+
}}
|
104 |
</style>
|
105 |
""", unsafe_allow_html=True)
|
106 |
|
107 |
+
# لوگو در مرکز
|
108 |
+
st.markdown("""
|
109 |
+
<div class="logo-container">
|
110 |
+
<img src="army.png" alt="لوگو">
|
111 |
+
</div>
|
112 |
+
""", unsafe_allow_html=True)
|
113 |
|
114 |
+
# تیتر
|
115 |
st.markdown("""
|
116 |
<div class="header-text">
|
117 |
+
<h1>چت بات ارتش</h1>
|
118 |
<div class="subtitle">دستیار هوشمند برای تصمیمگیری در میدان نبرد</div>
|
119 |
</div>
|
120 |
""", unsafe_allow_html=True)
|