Spaces:
Sleeping
Sleeping
Commit
·
6e503f7
1
Parent(s):
8b4c0fe
Update APP.py
Browse files
APP.py
CHANGED
@@ -37,15 +37,15 @@ def qa(file, openaikey, query, chain_type, k):
|
|
37 |
iface = gr.Interface(
|
38 |
fn=qa,
|
39 |
inputs=[
|
40 |
-
gr.inputs.File(label="
|
41 |
gr.inputs.Textbox(label="OpenAI API Key"),
|
42 |
-
gr.inputs.Textbox(label="
|
43 |
gr.inputs.Dropdown(choices=['stuff', 'map_reduce', "refine", "map_rerank"], label="Chain type"),
|
44 |
gr.inputs.Slider(minimum=1, maximum=5, default=2, label="Number of relevant chunks"),
|
45 |
],
|
46 |
outputs="text",
|
47 |
-
title="
|
48 |
-
description="
|
49 |
)
|
50 |
|
51 |
iface.launch()
|
|
|
37 |
iface = gr.Interface(
|
38 |
fn=qa,
|
39 |
inputs=[
|
40 |
+
gr.inputs.File(label="Upload PDF"),
|
41 |
gr.inputs.Textbox(label="OpenAI API Key"),
|
42 |
+
gr.inputs.Textbox(label="Your question"),
|
43 |
gr.inputs.Dropdown(choices=['stuff', 'map_reduce', "refine", "map_rerank"], label="Chain type"),
|
44 |
gr.inputs.Slider(minimum=1, maximum=5, default=2, label="Number of relevant chunks"),
|
45 |
],
|
46 |
outputs="text",
|
47 |
+
title="Question Answering with your PDF file",
|
48 |
+
description="Upload a PDF file, enter OpenAI API key, type a question and get your answer."
|
49 |
)
|
50 |
|
51 |
iface.launch()
|