Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ from together import Together
|
|
12 |
|
13 |
import streamlit as st
|
14 |
|
|
|
|
|
15 |
# ----------------- تنظیمات صفحه -----------------
|
16 |
st.set_page_config(page_title="رزم یار ارتش", page_icon="🪖", layout="wide")
|
17 |
|
@@ -31,51 +33,54 @@ st.markdown("""
|
|
31 |
.sidebar .sidebar-content {
|
32 |
background-color: #ffffff;
|
33 |
border-left: 2px solid #4e8a3e;
|
34 |
-
padding-top:
|
35 |
}
|
36 |
.sidebar .sidebar-content div {
|
37 |
-
margin-bottom:
|
38 |
font-weight: bold;
|
39 |
color: #2c3e50;
|
|
|
40 |
}
|
41 |
.stButton>button {
|
42 |
background-color: #4e8a3e !important;
|
43 |
color: white !important;
|
44 |
font-weight: bold;
|
45 |
-
border-radius:
|
46 |
-
padding:
|
47 |
transition: 0.3s;
|
|
|
48 |
}
|
49 |
.stButton>button:hover {
|
50 |
background-color: #3c6d30 !important;
|
51 |
}
|
52 |
.header-text {
|
53 |
text-align: center;
|
54 |
-
margin-top:
|
55 |
-
margin-bottom:
|
56 |
-
background-color: rgba(255, 255, 255, 0.
|
57 |
-
padding:
|
58 |
-
border-radius:
|
59 |
-
box-shadow: 0 4px
|
60 |
}
|
61 |
.header-text h1 {
|
62 |
-
font-size:
|
63 |
color: #2c3e50;
|
64 |
margin: 0;
|
65 |
font-weight: bold;
|
66 |
}
|
67 |
.subtitle {
|
68 |
-
font-size:
|
69 |
color: #34495e;
|
70 |
-
margin-top:
|
71 |
}
|
72 |
.chat-message {
|
73 |
-
background-color: rgba(255, 255, 255, 0.
|
74 |
border: 1px solid #4e8a3e;
|
75 |
border-radius: 12px;
|
76 |
-
padding:
|
77 |
-
margin-bottom:
|
78 |
-
box-shadow: 0 4px 8px rgba(0,0,0,0.
|
|
|
79 |
}
|
80 |
.stTextInput>div>input, .stTextArea textarea {
|
81 |
background-color: rgba(255,255,255,0.9) !important;
|
@@ -84,31 +89,69 @@ st.markdown("""
|
|
84 |
text-align: right;
|
85 |
font-family: 'Vazirmatn', Tahoma;
|
86 |
}
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
</style>
|
92 |
""", unsafe_allow_html=True)
|
93 |
|
94 |
# ----------------- بدنه اصلی -----------------
|
95 |
with st.sidebar:
|
96 |
-
st.image("log.png",
|
97 |
-
|
98 |
-
st.
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
# محتوای اصلی
|
114 |
st.markdown("""
|
@@ -120,7 +163,7 @@ st.markdown("""
|
|
120 |
|
121 |
st.markdown('<div class="chat-message">👋 سلام! چطور میتونم کمکتون کنم؟</div>', unsafe_allow_html=True)
|
122 |
|
123 |
-
#
|
124 |
user_input = st.text_input("پیام خود را وارد کنید...")
|
125 |
|
126 |
if user_input:
|
|
|
12 |
|
13 |
import streamlit as st
|
14 |
|
15 |
+
import streamlit as st
|
16 |
+
|
17 |
# ----------------- تنظیمات صفحه -----------------
|
18 |
st.set_page_config(page_title="رزم یار ارتش", page_icon="🪖", layout="wide")
|
19 |
|
|
|
33 |
.sidebar .sidebar-content {
|
34 |
background-color: #ffffff;
|
35 |
border-left: 2px solid #4e8a3e;
|
36 |
+
padding-top: 10px;
|
37 |
}
|
38 |
.sidebar .sidebar-content div {
|
39 |
+
margin-bottom: 10px;
|
40 |
font-weight: bold;
|
41 |
color: #2c3e50;
|
42 |
+
font-size: 15px;
|
43 |
}
|
44 |
.stButton>button {
|
45 |
background-color: #4e8a3e !important;
|
46 |
color: white !important;
|
47 |
font-weight: bold;
|
48 |
+
border-radius: 8px;
|
49 |
+
padding: 5px 16px;
|
50 |
transition: 0.3s;
|
51 |
+
font-size: 14px;
|
52 |
}
|
53 |
.stButton>button:hover {
|
54 |
background-color: #3c6d30 !important;
|
55 |
}
|
56 |
.header-text {
|
57 |
text-align: center;
|
58 |
+
margin-top: 15px;
|
59 |
+
margin-bottom: 25px;
|
60 |
+
background-color: rgba(255, 255, 255, 0.85);
|
61 |
+
padding: 16px;
|
62 |
+
border-radius: 16px;
|
63 |
+
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
|
64 |
}
|
65 |
.header-text h1 {
|
66 |
+
font-size: 36px;
|
67 |
color: #2c3e50;
|
68 |
margin: 0;
|
69 |
font-weight: bold;
|
70 |
}
|
71 |
.subtitle {
|
72 |
+
font-size: 16px;
|
73 |
color: #34495e;
|
74 |
+
margin-top: 5px;
|
75 |
}
|
76 |
.chat-message {
|
77 |
+
background-color: rgba(255, 255, 255, 0.95);
|
78 |
border: 1px solid #4e8a3e;
|
79 |
border-radius: 12px;
|
80 |
+
padding: 14px;
|
81 |
+
margin-bottom: 10px;
|
82 |
+
box-shadow: 0 4px 8px rgba(0,0,0,0.08);
|
83 |
+
animation: fadeIn 0.5s ease;
|
84 |
}
|
85 |
.stTextInput>div>input, .stTextArea textarea {
|
86 |
background-color: rgba(255,255,255,0.9) !important;
|
|
|
89 |
text-align: right;
|
90 |
font-family: 'Vazirmatn', Tahoma;
|
91 |
}
|
92 |
+
img.small-logo {
|
93 |
+
width: 90px;
|
94 |
+
margin-bottom: 15px;
|
95 |
+
display: block;
|
96 |
+
margin-right: auto;
|
97 |
+
margin-left: auto;
|
98 |
+
}
|
99 |
+
.menu-item {
|
100 |
+
display: flex;
|
101 |
+
align-items: center;
|
102 |
+
gap: 8px;
|
103 |
+
padding: 6px 0;
|
104 |
+
font-size: 15px;
|
105 |
+
cursor: pointer;
|
106 |
+
}
|
107 |
+
.menu-item img {
|
108 |
+
width: 20px;
|
109 |
+
height: 20px;
|
110 |
}
|
111 |
</style>
|
112 |
""", unsafe_allow_html=True)
|
113 |
|
114 |
# ----------------- بدنه اصلی -----------------
|
115 |
with st.sidebar:
|
116 |
+
st.image("log.png", class_="small-logo")
|
117 |
+
|
118 |
+
st.markdown("""
|
119 |
+
<div class="menu-item">
|
120 |
+
<img src="https://cdn-icons-png.flaticon.com/512/3596/3596165.png" />
|
121 |
+
گفتگوی جدید
|
122 |
+
</div>
|
123 |
+
<div class="menu-item">
|
124 |
+
<img src="https://cdn-icons-png.flaticon.com/512/709/709496.png" />
|
125 |
+
تاریخچه
|
126 |
+
</div>
|
127 |
+
<hr/>
|
128 |
+
<div class="menu-item">
|
129 |
+
<img src="https://cdn-icons-png.flaticon.com/512/1828/1828932.png" />
|
130 |
+
مدلهای هوش مصنوعی
|
131 |
+
</div>
|
132 |
+
<div class="menu-item">
|
133 |
+
<img src="https://cdn-icons-png.flaticon.com/512/681/681494.png" />
|
134 |
+
تولید محتوا
|
135 |
+
</div>
|
136 |
+
<hr/>
|
137 |
+
<div class="menu-item">
|
138 |
+
<img src="https://cdn-icons-png.flaticon.com/512/3601/3601646.png" />
|
139 |
+
دستیار ویژه
|
140 |
+
</div>
|
141 |
+
<div class="menu-item">
|
142 |
+
<img src="https://cdn-icons-png.flaticon.com/512/709/709612.png" />
|
143 |
+
ابزار مالی
|
144 |
+
</div>
|
145 |
+
<hr/>
|
146 |
+
<div class="menu-item">
|
147 |
+
<img src="https://cdn-icons-png.flaticon.com/512/2099/2099058.png" />
|
148 |
+
تنظیمات
|
149 |
+
</div>
|
150 |
+
<div class="menu-item">
|
151 |
+
<img src="https://cdn-icons-png.flaticon.com/512/597/597177.png" />
|
152 |
+
پشتیبانی
|
153 |
+
</div>
|
154 |
+
""", unsafe_allow_html=True)
|
155 |
|
156 |
# محتوای اصلی
|
157 |
st.markdown("""
|
|
|
163 |
|
164 |
st.markdown('<div class="chat-message">👋 سلام! چطور میتونم کمکتون کنم؟</div>', unsafe_allow_html=True)
|
165 |
|
166 |
+
# چت اینپوت کاربر
|
167 |
user_input = st.text_input("پیام خود را وارد کنید...")
|
168 |
|
169 |
if user_input:
|