saad-sust commited on
Commit
0be6505
ยท
verified ยท
1 Parent(s): d15db53

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -52
app.py CHANGED
@@ -2230,65 +2230,56 @@ with st.sidebar:
2230
  # MAIN AREA
2231
  # โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2232
 
2233
- # Header
2234
- st.markdown("""
2235
- <div style="text-align:center; padding:2rem 0 1rem 0;">
2236
- <div style="
2237
- font-size:2.4rem;
2238
- font-weight:700;
2239
- color:#ffffff;
2240
- letter-spacing:0.5px;
2241
- margin-bottom:0.4rem;
2242
- font-family:'Inter',sans-serif;
2243
- ">Saad.AI</div>
2244
- <div style="font-size:0.85rem; color:#6b7280;">
2245
- Your BSc Mathematics Assistant
2246
- </div>
2247
- </div>
2248
- """, unsafe_allow_html=True)
2249
-
2250
  # Welcome message if no chat
2251
  if not st.session_state.messages:
2252
  st.markdown("""
2253
- <div style="text-align:center; padding:3rem 0 2rem 0;">
2254
- <div style="
2255
- font-size:3rem;
2256
- margin-bottom:0.8rem;
2257
- animation: pulse 2s infinite;
2258
- ">๐Ÿงฎ</div>
2259
- <div style="font-size:1.1rem; color:#d1d5db; font-weight:500; margin-bottom:0.5rem;">
2260
- How can I help you today?
2261
- </div>
2262
- <div style="font-size:0.82rem; color:#4b5563; margin-bottom:2rem;">
2263
- Ask me anything โ€” math problems, explanations, or just say hi
2264
- </div>
2265
- <div style="display:flex; flex-wrap:wrap; gap:0.5rem; justify-content:center; max-width:600px; margin:0 auto;">
2266
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2267
- ๐Ÿ“ˆ Differentiate xยณ + 2x
2268
- </span>
2269
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2270
- โˆซ Integrate sin(x)ยทeหฃ
2271
- </span>
2272
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2273
- ๐Ÿ”ข Solve ODE dy/dx + 2y = eโปหฃ
2274
- </span>
2275
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2276
- ๐Ÿงฎ Newton-Raphson xยณโˆ’2xโˆ’5=0
2277
- </span>
2278
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2279
- ๐Ÿ“ Find curvature of y=xยฒ
2280
- </span>
2281
- <span style="background:#111827; border:1px solid #1f2937; color:#9ca3af; padding:0.5rem 1rem; border-radius:20px; font-size:0.8rem; cursor:pointer;">
2282
- ๐Ÿ“Š Plot y = xยฒ โˆ’ 4
2283
- </span>
2284
- </div>
2285
- </div>
2286
  <style>
2287
- @keyframes pulse {
 
 
 
 
2288
  0%, 100% { opacity: 1; }
2289
- 50% { opacity: 0.6; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2290
  }
2291
  </style>
 
 
 
 
2292
  """, unsafe_allow_html=True)
2293
 
2294
  # Render chat history
 
2230
  # MAIN AREA
2231
  # โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2233
  # Welcome message if no chat
2234
  if not st.session_state.messages:
2235
  st.markdown("""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2236
  <style>
2237
+ @keyframes fadeInUp {
2238
+ from { opacity: 0; transform: translateY(20px); }
2239
+ to { opacity: 1; transform: translateY(0); }
2240
+ }
2241
+ @keyframes blink {
2242
  0%, 100% { opacity: 1; }
2243
+ 50% { opacity: 0; }
2244
+ }
2245
+ .saad-welcome {
2246
+ display: flex;
2247
+ flex-direction: column;
2248
+ align-items: center;
2249
+ justify-content: center;
2250
+ padding: 6rem 1rem 4rem 1rem;
2251
+ text-align: center;
2252
+ animation: fadeInUp 0.6s ease both;
2253
+ }
2254
+ .saad-name {
2255
+ font-size: 2.6rem;
2256
+ font-weight: 700;
2257
+ color: #ffffff;
2258
+ font-family: 'Inter', sans-serif;
2259
+ letter-spacing: 0.5px;
2260
+ margin-bottom: 0.6rem;
2261
+ }
2262
+ .saad-sub {
2263
+ font-size: 0.88rem;
2264
+ color: #4b5563;
2265
+ letter-spacing: 0.3px;
2266
+ margin-bottom: 1.2rem;
2267
+ }
2268
+ .saad-cursor {
2269
+ display: inline-block;
2270
+ width: 2px;
2271
+ height: 1.4rem;
2272
+ background: #3b82f6;
2273
+ margin-left: 4px;
2274
+ vertical-align: middle;
2275
+ animation: blink 1s step-start infinite;
2276
+ border-radius: 1px;
2277
  }
2278
  </style>
2279
+ <div class="saad-welcome">
2280
+ <div class="saad-name">Saad.AI <span class="saad-cursor"></span></div>
2281
+ <div class="saad-sub">BSc Mathematics ยท Step-by-Step ยท SymPy Verified ยท LaTeX Rendered</div>
2282
+ </div>
2283
  """, unsafe_allow_html=True)
2284
 
2285
  # Render chat history