Spaces:
Sleeping
Sleeping
iaravagni
commited on
Commit
·
3fc053b
1
Parent(s):
de14444
App update
Browse files
app.py
CHANGED
|
@@ -99,6 +99,7 @@ def pipeline(filePath, query):
|
|
| 99 |
def gradio_interface(file, question):
|
| 100 |
return pipeline(file.name, question)
|
| 101 |
|
|
|
|
| 102 |
iface = gr.Interface(
|
| 103 |
fn=gradio_interface,
|
| 104 |
inputs=[
|
|
@@ -106,7 +107,11 @@ iface = gr.Interface(
|
|
| 106 |
gr.Textbox(label="Ask a Question")
|
| 107 |
],
|
| 108 |
outputs="text",
|
| 109 |
-
live=
|
|
|
|
|
|
|
|
|
|
| 110 |
)
|
| 111 |
|
|
|
|
| 112 |
iface.launch()
|
|
|
|
| 99 |
def gradio_interface(file, question):
|
| 100 |
return pipeline(file.name, question)
|
| 101 |
|
| 102 |
+
# Create the Gradio interface
|
| 103 |
iface = gr.Interface(
|
| 104 |
fn=gradio_interface,
|
| 105 |
inputs=[
|
|
|
|
| 107 |
gr.Textbox(label="Ask a Question")
|
| 108 |
],
|
| 109 |
outputs="text",
|
| 110 |
+
live=False, # Disable live updates
|
| 111 |
+
title="RAG App system", # Title of the app
|
| 112 |
+
description="Upload a PDF and ask a question to extract information from it.", # Optional description
|
| 113 |
+
allow_flagging="never",
|
| 114 |
)
|
| 115 |
|
| 116 |
+
# Launch the interface
|
| 117 |
iface.launch()
|