Spaces:
Running
Running
Added version string
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
3 |
docs = None
|
4 |
|
@@ -30,7 +32,6 @@ def do_ask(question, button, openapi, dataset, slider, progress=gr.Progress()):
|
|
30 |
if docs is None: # don't want to rebuild index if it's already built
|
31 |
import os
|
32 |
os.environ['OPENAI_API_KEY'] = openapi.strip()
|
33 |
-
import paperqa
|
34 |
docs = paperqa.Docs()
|
35 |
# dataset is pandas dataframe
|
36 |
for _, row in dataset.iterrows():
|
@@ -54,8 +55,8 @@ def do_ask(question, button, openapi, dataset, slider, progress=gr.Progress()):
|
|
54 |
|
55 |
|
56 |
with gr.Blocks() as demo:
|
57 |
-
gr.Markdown("""
|
58 |
-
# Document Question and Answer
|
59 |
|
60 |
This tool will enable asking questions of your uploaded text or PDF documents.
|
61 |
It uses OpenAI's GPT models and thus you must enter your API key below. This
|
|
|
1 |
import gradio as gr
|
2 |
+
import paperqa
|
3 |
+
|
4 |
|
5 |
docs = None
|
6 |
|
|
|
32 |
if docs is None: # don't want to rebuild index if it's already built
|
33 |
import os
|
34 |
os.environ['OPENAI_API_KEY'] = openapi.strip()
|
|
|
35 |
docs = paperqa.Docs()
|
36 |
# dataset is pandas dataframe
|
37 |
for _, row in dataset.iterrows():
|
|
|
55 |
|
56 |
|
57 |
with gr.Blocks() as demo:
|
58 |
+
gr.Markdown(f"""
|
59 |
+
# Document Question and Answer (v{paperqa.__version__})
|
60 |
|
61 |
This tool will enable asking questions of your uploaded text or PDF documents.
|
62 |
It uses OpenAI's GPT models and thus you must enter your API key below. This
|