smolinski commited on
Commit
37b2256
verified
1 Parent(s): 5019a38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -27
app.py CHANGED
@@ -433,6 +433,12 @@ with gr.Blocks(css="""
433
  margin-top: 6px;
434
  min-height: 8em;
435
  }
 
 
 
 
 
 
436
  """) as gui:
437
 
438
  session_dir = gr.State(value=init_user_session)
@@ -444,35 +450,20 @@ with gr.Blocks(css="""
444
 
445
  with gr.Tabs():
446
 
447
- # ChatBot
448
- '''
449
- with gr.TabItem("馃挰 Chat"):
 
 
 
 
450
  chatbot = gr.Chatbot()
451
  input_text_chat = gr.Textbox(placeholder="Napisz tutaj pytanie...", container=False, autoscroll=True, scale=7)
452
  input_text_chat.submit(fn=stream_response, inputs=[input_text_chat, chatbot], outputs=[chatbot, input_text_chat])
453
- '''
454
- with gr.TabItem("馃挰 Chat"):
455
- with gr.Row():
456
- with gr.Column(scale=1): # lewy margines
457
- gr.Markdown("") # pusty
458
- with gr.Column(scale=2): # g艂贸wna kolumna z chatbotem
459
- chatbot = gr.Chatbot()
460
- input_text_chat = gr.Textbox(
461
- placeholder="Napisz tutaj pytanie...",
462
- container=False,
463
- autoscroll=True,
464
- scale=7
465
- )
466
- input_text_chat.submit(
467
- fn=stream_response,
468
- inputs=[input_text_chat, chatbot],
469
- outputs=[chatbot, input_text_chat]
470
- )
471
- with gr.Column(scale=1): # prawy margines
472
- gr.Markdown("") # pusty
473
-
474
- # Formularz
475
- with gr.TabItem("馃摑 Formularz"):
476
  input_text_form = gr.Textbox(label="Zadaj pytanie:", placeholder="Napisz tutaj pytanie...", lines=2, interactive=True)
477
 
478
  with gr.Row():
@@ -490,7 +481,6 @@ with gr.Blocks(css="""
490
  )
491
 
492
  output_cytaty = gr.State("")
493
-
494
  with gr.Row():
495
  with gr.Column(scale=1):
496
  zacytuj_button = gr.Button("Przytocz 藕r贸d艂a")
@@ -503,6 +493,7 @@ with gr.Blocks(css="""
503
  gr.Markdown("### Pobierz odpowiedzi:")
504
  download_files = gr.File(label="Pliki do pobrania", interactive=False, file_types=[".docx"])
505
 
 
506
  # Logika przycisk贸w
507
  submit_button.click(
508
  response,
 
433
  margin-top: 6px;
434
  min-height: 8em;
435
  }
436
+
437
+ #waskie_kontener {
438
+ max-width: 750px;
439
+ margin: 0 auto;
440
+ }
441
+
442
  """) as gui:
443
 
444
  session_dir = gr.State(value=init_user_session)
 
450
 
451
  with gr.Tabs():
452
 
453
+ # ChatBot
454
+ with gr.TabItem("馃挰 Chat"):
455
+ with gr.Column(elem_id="waskie_kontener"):
456
+ gr.Markdown("# Asystent Finansowy")
457
+ gr.Markdown("### Odpowiadam na pytania z zakresu ETF-贸w notowanych na GPW.")
458
+ gr.Markdown("###### Pami臋taj: jestem tylko chatbotem...")
459
+
460
  chatbot = gr.Chatbot()
461
  input_text_chat = gr.Textbox(placeholder="Napisz tutaj pytanie...", container=False, autoscroll=True, scale=7)
462
  input_text_chat.submit(fn=stream_response, inputs=[input_text_chat, chatbot], outputs=[chatbot, input_text_chat])
463
+
464
+ # Formularz
465
+ with gr.TabItem("馃摑 Formularz"):
466
+ with gr.Column(elem_id="waskie_kontener"): # te偶 w tym samym kontenerze
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  input_text_form = gr.Textbox(label="Zadaj pytanie:", placeholder="Napisz tutaj pytanie...", lines=2, interactive=True)
468
 
469
  with gr.Row():
 
481
  )
482
 
483
  output_cytaty = gr.State("")
 
484
  with gr.Row():
485
  with gr.Column(scale=1):
486
  zacytuj_button = gr.Button("Przytocz 藕r贸d艂a")
 
493
  gr.Markdown("### Pobierz odpowiedzi:")
494
  download_files = gr.File(label="Pliki do pobrania", interactive=False, file_types=[".docx"])
495
 
496
+
497
  # Logika przycisk贸w
498
  submit_button.click(
499
  response,