Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,13 +18,13 @@ st.markdown("""
|
|
| 18 |
background: linear-gradient(135deg, #010409 0%, #0d1117 100%) !important;
|
| 19 |
}
|
| 20 |
|
| 21 |
-
/* تعديل خلفية القائمة الجانبية لتكون داكنة
|
| 22 |
[data-testid="stSidebar"] {
|
| 23 |
background-color: #0d1117 !important;
|
| 24 |
background-image: none !important;
|
| 25 |
}
|
| 26 |
|
| 27 |
-
/* تعديل صندوق إدخال النص
|
| 28 |
[data-testid="stChatInput"] {
|
| 29 |
background-color: #161b22 !important;
|
| 30 |
border-radius: 15px;
|
|
@@ -44,7 +44,7 @@ st.markdown("""
|
|
| 44 |
text-align: right;
|
| 45 |
}
|
| 46 |
|
| 47 |
-
/* العنوان الجانبي
|
| 48 |
.sidebar-title {
|
| 49 |
color: #FFD700 !important;
|
| 50 |
text-align: center;
|
|
@@ -97,7 +97,7 @@ st.markdown("""
|
|
| 97 |
color: #00f2ff; font-weight: bold;
|
| 98 |
}
|
| 99 |
|
| 100 |
-
/* إخفاء شعارات Streamlit
|
| 101 |
#MainMenu, footer, header {visibility: hidden;}
|
| 102 |
</style>
|
| 103 |
""", unsafe_allow_html=True)
|
|
@@ -128,13 +128,13 @@ if "view" not in st.session_state:
|
|
| 128 |
with st.sidebar:
|
| 129 |
st.markdown('<p class="sidebar-title">📍 المحطات التعليمية</p>', unsafe_allow_html=True)
|
| 130 |
|
| 131 |
-
# ع
|
| 132 |
-
if st.button("📈 6. رسم بياني"): st.session_state.q_auto = "رسم"
|
| 133 |
-
if st.button("🚀 5. فائدتها"): st.session_state.q_auto = "تغيير"
|
| 134 |
-
if st.button("🤖 4. الذكاء الاصطناعي"): st.session_state.q_auto = "ذكاء"
|
| 135 |
-
if st.button("⚡ 3. الخصائص الـ 5"): st.session_state.q_auto = "خصائص"
|
| 136 |
-
if st.button("⚖️ 2. العادية vs الضخمة"): st.session_state.q_auto = "الفرق"
|
| 137 |
if st.button("🔍 1. التعريف"): st.session_state.q_auto = "تعريف"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
st.markdown("---")
|
| 140 |
if st.button("⛓️ رحلة البيانات"): st.session_state.q_auto = "ترتيب"
|
|
@@ -163,7 +163,6 @@ if st.session_state.view == "quiz":
|
|
| 163 |
else:
|
| 164 |
st.markdown("<h1>🤖 الوكيل التعليمي الذكي</h1>", unsafe_allow_html=True)
|
| 165 |
|
| 166 |
-
# عرض الرسائل
|
| 167 |
for m in st.session_state.messages:
|
| 168 |
role_class = "user-text" if m["role"] == "user" else "bot-text"
|
| 169 |
st.markdown(f'<div class="{role_class}">{m["content"]}</div>', unsafe_allow_html=True)
|
|
@@ -171,7 +170,6 @@ else:
|
|
| 171 |
chart_data = pd.DataFrame({'السنة': [2010, 2015, 2020, 2025], 'حجم البيانات (زيتابايت)': [2, 12, 64, 175]})
|
| 172 |
st.area_chart(chart_data.set_index('السنة'))
|
| 173 |
|
| 174 |
-
# استلام المدخلات
|
| 175 |
u_input = st.chat_input("اسألني عن أي شيء...")
|
| 176 |
query = u_input or st.session_state.get("q_auto")
|
| 177 |
|
|
|
|
| 18 |
background: linear-gradient(135deg, #010409 0%, #0d1117 100%) !important;
|
| 19 |
}
|
| 20 |
|
| 21 |
+
/* تعديل خلفية القائمة الجانبية لتكون داكنة */
|
| 22 |
[data-testid="stSidebar"] {
|
| 23 |
background-color: #0d1117 !important;
|
| 24 |
background-image: none !important;
|
| 25 |
}
|
| 26 |
|
| 27 |
+
/* تعديل صندوق إدخال النص */
|
| 28 |
[data-testid="stChatInput"] {
|
| 29 |
background-color: #161b22 !important;
|
| 30 |
border-radius: 15px;
|
|
|
|
| 44 |
text-align: right;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
/* العنوان الجانبي */
|
| 48 |
.sidebar-title {
|
| 49 |
color: #FFD700 !important;
|
| 50 |
text-align: center;
|
|
|
|
| 97 |
color: #00f2ff; font-weight: bold;
|
| 98 |
}
|
| 99 |
|
| 100 |
+
/* إخفاء شعارات Streamlit */
|
| 101 |
#MainMenu, footer, header {visibility: hidden;}
|
| 102 |
</style>
|
| 103 |
""", unsafe_allow_html=True)
|
|
|
|
| 128 |
with st.sidebar:
|
| 129 |
st.markdown('<p class="sidebar-title">📍 المحطات التعليمية</p>', unsafe_allow_html=True)
|
| 130 |
|
| 131 |
+
# إعادة الترتيب للوضع الصحيح (1 إلى 6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
if st.button("🔍 1. التعريف"): st.session_state.q_auto = "تعريف"
|
| 133 |
+
if st.button("⚖️ 2. العادية vs الضخمة"): st.session_state.q_auto = "الفرق"
|
| 134 |
+
if st.button("⚡ 3. الخصائص الـ 5"): st.session_state.q_auto = "خصائص"
|
| 135 |
+
if st.button("🤖 4. الذكاء الاصطناعي"): st.session_state.q_auto = "ذكاء"
|
| 136 |
+
if st.button("🚀 5. فائدتها"): st.session_state.q_auto = "تغيير"
|
| 137 |
+
if st.button("📈 6. رسم بياني"): st.session_state.q_auto = "رسم"
|
| 138 |
|
| 139 |
st.markdown("---")
|
| 140 |
if st.button("⛓️ رحلة البيانات"): st.session_state.q_auto = "ترتيب"
|
|
|
|
| 163 |
else:
|
| 164 |
st.markdown("<h1>🤖 الوكيل التعليمي الذكي</h1>", unsafe_allow_html=True)
|
| 165 |
|
|
|
|
| 166 |
for m in st.session_state.messages:
|
| 167 |
role_class = "user-text" if m["role"] == "user" else "bot-text"
|
| 168 |
st.markdown(f'<div class="{role_class}">{m["content"]}</div>', unsafe_allow_html=True)
|
|
|
|
| 170 |
chart_data = pd.DataFrame({'السنة': [2010, 2015, 2020, 2025], 'حجم البيانات (زيتابايت)': [2, 12, 64, 175]})
|
| 171 |
st.area_chart(chart_data.set_index('السنة'))
|
| 172 |
|
|
|
|
| 173 |
u_input = st.chat_input("اسألني عن أي شيء...")
|
| 174 |
query = u_input or st.session_state.get("q_auto")
|
| 175 |
|