Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,15 +107,19 @@ with st.container():
|
|
| 107 |
generate_response(chatbot, txt, pdf_upload1) # Use pdf_upload1 here
|
| 108 |
render_file(pdf_upload1) # Use pdf_upload1 here
|
| 109 |
|
| 110 |
-
if __name__ == "__main__":
|
| 111 |
-
pdf_upload1 = gr.inputs.File(label="Upload PDF 1") # Define pdf_upload1
|
| 112 |
-
chatbot = gr.outputs.Textbox() # Define chatbot
|
| 113 |
-
txt = gr.inputs.Textbox(label="Enter your query") # Define txt
|
| 114 |
-
|
| 115 |
gr.Interface(
|
| 116 |
-
[render_first, add_text, generate_response, render_file],
|
| 117 |
-
[
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
title="PDF-Powered Chatbot"
|
| 120 |
).launch()
|
| 121 |
|
|
|
|
| 107 |
generate_response(chatbot, txt, pdf_upload1) # Use pdf_upload1 here
|
| 108 |
render_file(pdf_upload1) # Use pdf_upload1 here
|
| 109 |
|
| 110 |
+
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
gr.Interface(
|
| 112 |
+
[render_first, add_text, generate_response, render_file],
|
| 113 |
+
[
|
| 114 |
+
gr.inputs.File(label="Upload PDF 1"), # Define pdf_upload1
|
| 115 |
+
gr.outputs.Textbox(label="Chatbot Output"), # Define chatbot output
|
| 116 |
+
gr.inputs.Textbox(label="Enter your query") # Define txt
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
gr.outputs.Image(label="Rendered PDF Image"), # Define show_img
|
| 120 |
+
gr.outputs.Textbox(label="Chatbot Output"), # Define chatbot output
|
| 121 |
+
gr.inputs.Textbox(label="Enter your query") # Define txt
|
| 122 |
+
],
|
| 123 |
title="PDF-Powered Chatbot"
|
| 124 |
).launch()
|
| 125 |
|