rafaldembski commited on
Commit
a296739
1 Parent(s): cca740f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -33
app.py CHANGED
@@ -70,8 +70,6 @@ def generate(message, history, model, thinking_budget, api_key=None):
70
 
71
  if response.startswith("Error:"):
72
  assistant_response = response
73
- steps = []
74
- reflection = ""
75
  else:
76
  answer, reflection, steps = parse_response(response)
77
  # Budowanie odpowiedzi asystenta
@@ -82,12 +80,11 @@ def generate(message, history, model, thinking_budget, api_key=None):
82
  # Aktualizacja historii jako lista krotek
83
  updated_history = history + [(message, assistant_response)]
84
 
85
- # Przygotowanie informacji do wyświetlenia
86
  current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
87
  info_text = f"""
88
  **🕒 Czas Myślenia:** {thinking_time:.2f} sek<br>
89
  **🔧 Wybrany Model:** {model}<br>
90
- **📋 Liczba Kroków:** {len(steps)}<br>
91
  **📅 Data i Czas Odpowiedzi:** {current_time}<br>
92
  **🪙 Liczba Tokenów:** {tokens_used}
93
  """
@@ -228,9 +225,8 @@ body {
228
  .brutalist-card__message {
229
  margin-top: 1rem;
230
  color: #000;
231
- font-size: 0.9rem;
232
- line-height: 1.4;
233
- border-bottom: 2px solid #000;
234
  padding-bottom: 1rem;
235
  font-weight: 600;
236
  }
@@ -313,10 +309,6 @@ body {
313
  padding: 10px;
314
  }
315
 
316
- h1, .gr-markdown h1 {
317
- font-size: 2em;
318
- }
319
-
320
  .brutalist-card {
321
  max-width: 100%;
322
  padding: 1rem;
@@ -348,20 +340,6 @@ body {
348
  }
349
 
350
  /* Stylizacja pozostałych elementów */
351
- h1, .gr-markdown h1 {
352
- color: #000;
353
- text-align: center;
354
- margin-bottom: 20px;
355
- font-size: 2.5em;
356
- font-family: 'Courier New', Courier, monospace;
357
- }
358
-
359
- h2, .gr-markdown h2 {
360
- color: #000;
361
- margin-top: 1.5em;
362
- font-family: 'Courier New', Courier, monospace;
363
- }
364
-
365
  .gr-chatbot {
366
  height: 600px;
367
  overflow-y: auto;
@@ -416,26 +394,23 @@ with gr.Blocks(css=custom_css) as demo:
416
  <div class="brutalist-card__alert">D-LOGIC: Twój Inteligentny Asystent AI 🧠</div>
417
  </div>
418
  <div class="brutalist-card__message">
419
- <p>🧠 **D-LOGIC Interface**</p>
420
- <p>**D-LOGIC** to zaawansowany asystent AI, który oferuje:</p>
421
  <ul>
422
  <li>📋 <strong>Analiza Kontekstu</strong> – Zrozumienie intencji i emocji użytkownika.</li>
423
  <li>🔍 <strong>Planowanie Odpowiedzi</strong> – Rozbicie problemu na mniejsze kroki.</li>
424
  <li>📝 <strong>Generowanie Rozwiązań</strong> – Proponowanie najlepszych możliwych odpowiedzi.</li>
425
  <li>💡 <strong>Refleksja</strong> – Samoocena jakości odpowiedzi i procesów myślowych.</li>
426
  </ul>
427
- <p>🤖 **D-LOGIC** jest tutaj, aby pomóc Ci w każdym aspekcie, zapewniając inteligentne i spersonalizowane odpowiedzi.</p>
428
  </div>
429
  <div class="brutalist-card__actions">
430
- <a class="brutalist-card__button brutalist-card__button--mark" href="https://www.facebook.com/profile.php?id=100063901358728">🧐Facebook</a>
431
  <a class="brutalist-card__button brutalist-card__button--read" href="https://www.facebook.com/profile.php?id=61561715810219">🧠 D-LOGIC</a>
432
  </div>
433
  </div>
434
  """)
435
-
436
- # Nagłówek główny
437
- gr.Markdown("# 🧠 **D-LOGIC: Twój Inteligentny Asystent AI**")
438
-
439
  # Sekcja wyboru modelu i budżet myślenia
440
  with gr.Row():
441
  with gr.Column(scale=1):
 
70
 
71
  if response.startswith("Error:"):
72
  assistant_response = response
 
 
73
  else:
74
  answer, reflection, steps = parse_response(response)
75
  # Budowanie odpowiedzi asystenta
 
80
  # Aktualizacja historii jako lista krotek
81
  updated_history = history + [(message, assistant_response)]
82
 
83
+ # Przygotowanie informacji do wyświetlenia (bez liczby kroków)
84
  current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
85
  info_text = f"""
86
  **🕒 Czas Myślenia:** {thinking_time:.2f} sek<br>
87
  **🔧 Wybrany Model:** {model}<br>
 
88
  **📅 Data i Czas Odpowiedzi:** {current_time}<br>
89
  **🪙 Liczba Tokenów:** {tokens_used}
90
  """
 
225
  .brutalist-card__message {
226
  margin-top: 1rem;
227
  color: #000;
228
+ font-size: 0.95rem;
229
+ line-height: 1.6;
 
230
  padding-bottom: 1rem;
231
  font-weight: 600;
232
  }
 
309
  padding: 10px;
310
  }
311
 
 
 
 
 
312
  .brutalist-card {
313
  max-width: 100%;
314
  padding: 1rem;
 
340
  }
341
 
342
  /* Stylizacja pozostałych elementów */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  .gr-chatbot {
344
  height: 600px;
345
  overflow-y: auto;
 
394
  <div class="brutalist-card__alert">D-LOGIC: Twój Inteligentny Asystent AI 🧠</div>
395
  </div>
396
  <div class="brutalist-card__message">
397
+ <p>🧠 <strong>D-LOGIC Interface</strong></p>
398
+ <p><strong>D-LOGIC</strong> to zaawansowany asystent AI, który oferuje:</p>
399
  <ul>
400
  <li>📋 <strong>Analiza Kontekstu</strong> – Zrozumienie intencji i emocji użytkownika.</li>
401
  <li>🔍 <strong>Planowanie Odpowiedzi</strong> – Rozbicie problemu na mniejsze kroki.</li>
402
  <li>📝 <strong>Generowanie Rozwiązań</strong> – Proponowanie najlepszych możliwych odpowiedzi.</li>
403
  <li>💡 <strong>Refleksja</strong> – Samoocena jakości odpowiedzi i procesów myślowych.</li>
404
  </ul>
405
+ <p>🤖 <strong>D-LOGIC</strong> jest tutaj, aby pomóc Ci w każdym aspekcie, zapewniając inteligentne i spersonalizowane odpowiedzi.</p>
406
  </div>
407
  <div class="brutalist-card__actions">
408
+ <a class="brutalist-card__button brutalist-card__button--mark" href="https://www.facebook.com/profile.php?id=100063901358728">🧐 Facebook</a>
409
  <a class="brutalist-card__button brutalist-card__button--read" href="https://www.facebook.com/profile.php?id=61561715810219">🧠 D-LOGIC</a>
410
  </div>
411
  </div>
412
  """)
413
+
 
 
 
414
  # Sekcja wyboru modelu i budżet myślenia
415
  with gr.Row():
416
  with gr.Column(scale=1):