Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,6 @@ def answer_query(query):
|
|
36 |
question = query
|
37 |
return pdf_qa.run(question)
|
38 |
|
39 |
-
|
40 |
html = """
|
41 |
<div style="text-align:center; max width: 700px;">
|
42 |
<h1>ChatPDF</h1>
|
@@ -48,7 +47,8 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
|
|
48 |
gr.HTML(html)
|
49 |
with gr.Column():
|
50 |
gr.Markdown('ChatPDF')
|
51 |
-
|
|
|
52 |
with gr.Row():
|
53 |
load_pdf = gr.Button('Load pdf file')
|
54 |
status = gr.Textbox(label="Status",placeholder='',interactive=False)
|
|
|
36 |
question = query
|
37 |
return pdf_qa.run(question)
|
38 |
|
|
|
39 |
html = """
|
40 |
<div style="text-align:center; max width: 700px;">
|
41 |
<h1>ChatPDF</h1>
|
|
|
47 |
gr.HTML(html)
|
48 |
with gr.Column():
|
49 |
gr.Markdown('ChatPDF')
|
50 |
+
openai_key = gr.Textbox(label="Your OpenAI API key", type="password")
|
51 |
+
pdf_doc = gr.File(label="Load a pdf",file_types=['.pdf'],type='file')
|
52 |
with gr.Row():
|
53 |
load_pdf = gr.Button('Load pdf file')
|
54 |
status = gr.Textbox(label="Status",placeholder='',interactive=False)
|