Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ else:
|
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
-
# ----- 7) Load About Me text and RAG Functions-----
|
| 114 |
print("Load Hobby Pictures --> Load RAG Functions")
|
| 115 |
|
| 116 |
try:
|
|
@@ -145,7 +145,6 @@ else:
|
|
| 145 |
|
| 146 |
|
| 147 |
def load_pdf_and_update(file_obj):
|
| 148 |
-
"""Handles PDF upload and updates the viewer"""
|
| 149 |
if file_obj is None:
|
| 150 |
return None, gr.update(value="./sample_paper.pdf")
|
| 151 |
|
|
@@ -780,7 +779,7 @@ with gr.Blocks(theme = gr.themes.Soft(), css = app_css, title = "Suhas’ KI-Por
|
|
| 780 |
with gr.Group(elem_classes="demo-tile"):
|
| 781 |
gr.Markdown("<h2 style='text-align: center; font-size: 26px; margin-top: 0;'>Chat-Engine</h2>")
|
| 782 |
|
| 783 |
-
with gr.Column(
|
| 784 |
demo_chatbot = gr.Chatbot(type = "messages", elem_id = "demo-chat-column", scale = 1, height = "100%")
|
| 785 |
demo_msg_box = gr.Textbox(label = " ", scale = 0, placeholder = "Stellen Sie eine Frage zum hochgeladenen PDF... \nMaximal 10 Abfragen.", elem_id = "chat-input-box", lines = 1)
|
| 786 |
|
|
|
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
+
# ----- 7) Load About Me text and RAG Functions -----
|
| 114 |
print("Load Hobby Pictures --> Load RAG Functions")
|
| 115 |
|
| 116 |
try:
|
|
|
|
| 145 |
|
| 146 |
|
| 147 |
def load_pdf_and_update(file_obj):
|
|
|
|
| 148 |
if file_obj is None:
|
| 149 |
return None, gr.update(value="./sample_paper.pdf")
|
| 150 |
|
|
|
|
| 779 |
with gr.Group(elem_classes="demo-tile"):
|
| 780 |
gr.Markdown("<h2 style='text-align: center; font-size: 26px; margin-top: 0;'>Chat-Engine</h2>")
|
| 781 |
|
| 782 |
+
with gr.Column(elem_classes = "scrollable-content"):
|
| 783 |
demo_chatbot = gr.Chatbot(type = "messages", elem_id = "demo-chat-column", scale = 1, height = "100%")
|
| 784 |
demo_msg_box = gr.Textbox(label = " ", scale = 0, placeholder = "Stellen Sie eine Frage zum hochgeladenen PDF... \nMaximal 10 Abfragen.", elem_id = "chat-input-box", lines = 1)
|
| 785 |
|