Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,18 +141,8 @@ def create_gradio_interface():
|
|
| 141 |
outputs=[status_output]
|
| 142 |
)
|
| 143 |
|
| 144 |
-
|
| 145 |
fn=rag.generate_response,
|
| 146 |
-
chatbot=gr.Chatbot(
|
| 147 |
-
label="Chat History",
|
| 148 |
-
height=400,
|
| 149 |
-
show_label=True,
|
| 150 |
-
),
|
| 151 |
-
textbox=gr.Textbox(
|
| 152 |
-
placeholder="Ask a question about the PDF...",
|
| 153 |
-
container=False,
|
| 154 |
-
scale=7,
|
| 155 |
-
),
|
| 156 |
title="Chat with your PDF",
|
| 157 |
description="Upload a PDF and ask questions about its contents.",
|
| 158 |
theme="soft",
|
|
@@ -161,9 +151,6 @@ def create_gradio_interface():
|
|
| 161 |
"Can you summarize the key points?",
|
| 162 |
"What are the main conclusions?",
|
| 163 |
],
|
| 164 |
-
retry_btn="Retry",
|
| 165 |
-
undo_btn="Undo",
|
| 166 |
-
clear_btn="Clear",
|
| 167 |
)
|
| 168 |
|
| 169 |
return demo
|
|
|
|
| 141 |
outputs=[status_output]
|
| 142 |
)
|
| 143 |
|
| 144 |
+
chat_interface = gr.ChatInterface(
|
| 145 |
fn=rag.generate_response,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
title="Chat with your PDF",
|
| 147 |
description="Upload a PDF and ask questions about its contents.",
|
| 148 |
theme="soft",
|
|
|
|
| 151 |
"Can you summarize the key points?",
|
| 152 |
"What are the main conclusions?",
|
| 153 |
],
|
|
|
|
|
|
|
|
|
|
| 154 |
)
|
| 155 |
|
| 156 |
return demo
|