Update app.py
Browse files
app.py
CHANGED
|
@@ -141,8 +141,8 @@ def demo():
|
|
| 141 |
gr.Markdown("""<b>Query your PDF documents!</b> This AI agent is designed to perform retrieval augmented generation (RAG) on PDF documents. The app is hosted on Hugging Face Hub for the sole purpose of demonstration. \
|
| 142 |
<b>Please do not upload confidential documents.</b>
|
| 143 |
""")
|
| 144 |
-
with gr.Row():
|
| 145 |
-
with gr.Column(scale
|
| 146 |
gr.Markdown("<b>Step 1 - Upload PDF documents and Initialize RAG pipeline</b>")
|
| 147 |
with gr.Row():
|
| 148 |
document = gr.Files(height=300, file_count="multiple", file_types=[".pdf"], interactive=True, label="Upload PDF documents")
|
|
@@ -166,7 +166,7 @@ def demo():
|
|
| 166 |
with gr.Row():
|
| 167 |
llm_progress = gr.Textbox(value="Not initialized", show_label=False) # label="Chatbot status",
|
| 168 |
|
| 169 |
-
with gr.Column(scale
|
| 170 |
gr.Markdown("<b>Step 2 - Chat with your Document</b>")
|
| 171 |
chatbot = gr.Chatbot(height=505)
|
| 172 |
with gr.Accordion("Relevent context from the source document", open=False):
|
|
|
|
| 141 |
gr.Markdown("""<b>Query your PDF documents!</b> This AI agent is designed to perform retrieval augmented generation (RAG) on PDF documents. The app is hosted on Hugging Face Hub for the sole purpose of demonstration. \
|
| 142 |
<b>Please do not upload confidential documents.</b>
|
| 143 |
""")
|
| 144 |
+
with gr.Row(equal_height=True):
|
| 145 |
+
with gr.Column(min_width=300, scale=1):
|
| 146 |
gr.Markdown("<b>Step 1 - Upload PDF documents and Initialize RAG pipeline</b>")
|
| 147 |
with gr.Row():
|
| 148 |
document = gr.Files(height=300, file_count="multiple", file_types=[".pdf"], interactive=True, label="Upload PDF documents")
|
|
|
|
| 166 |
with gr.Row():
|
| 167 |
llm_progress = gr.Textbox(value="Not initialized", show_label=False) # label="Chatbot status",
|
| 168 |
|
| 169 |
+
with gr.Column(min_width=500, scale=2):
|
| 170 |
gr.Markdown("<b>Step 2 - Chat with your Document</b>")
|
| 171 |
chatbot = gr.Chatbot(height=505)
|
| 172 |
with gr.Accordion("Relevent context from the source document", open=False):
|