Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -119,6 +119,14 @@ with gr.Blocks() as demo:
|
|
119 |
The model is then able to answer questions by incorporating knowledge from the newly provided document. RAG can be used with thousands of documents, but this demo is limited to just one txt file.
|
120 |
""")
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
with gr.Row():
|
123 |
with gr.Column():
|
124 |
ques = gr.Textbox(label="Question", placeholder="Enter text here", lines=3)
|
|
|
119 |
The model is then able to answer questions by incorporating knowledge from the newly provided document. RAG can be used with thousands of documents, but this demo is limited to just one txt file.
|
120 |
""")
|
121 |
|
122 |
+
file_output = gr.File()
|
123 |
+
upload_button = gr.UploadButton(
|
124 |
+
label="Click to upload a text file",
|
125 |
+
file_types=["text"],
|
126 |
+
file_count="single"
|
127 |
+
)
|
128 |
+
upload_button.upload(upload_file(qa_chain), upload_button, file_output)
|
129 |
+
|
130 |
with gr.Row():
|
131 |
with gr.Column():
|
132 |
ques = gr.Textbox(label="Question", placeholder="Enter text here", lines=3)
|