Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
|
|
| 86 |
gr.HTML(title)
|
| 87 |
|
| 88 |
with gr.Column():
|
| 89 |
-
|
| 90 |
pdf_doc = gr.File(label="Load a file",file_types=['.pdf'],type='file')
|
| 91 |
relevant_pages = gr.Textbox(label="*Optional - Leave this field blank to use the entire PDF or provide comma separated page numbers like 3,4,5")
|
| 92 |
|
|
@@ -101,7 +101,7 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
|
|
| 101 |
submit_query = gr.Button("Ask Moli").style(full_width=False)
|
| 102 |
|
| 103 |
|
| 104 |
-
load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc,
|
| 105 |
|
| 106 |
submit_query.click(answer_query,input,output)
|
| 107 |
|
|
|
|
| 86 |
gr.HTML(title)
|
| 87 |
|
| 88 |
with gr.Column():
|
| 89 |
+
open_ai_keyai_key = gr.Textbox(label="Your GPT-4 OpenAI API key", type="password")
|
| 90 |
pdf_doc = gr.File(label="Load a file",file_types=['.pdf'],type='file')
|
| 91 |
relevant_pages = gr.Textbox(label="*Optional - Leave this field blank to use the entire PDF or provide comma separated page numbers like 3,4,5")
|
| 92 |
|
|
|
|
| 101 |
submit_query = gr.Button("Ask Moli").style(full_width=False)
|
| 102 |
|
| 103 |
|
| 104 |
+
load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, open_ai_key, relevant_pages], outputs=status)
|
| 105 |
|
| 106 |
submit_query.click(answer_query,input,output)
|
| 107 |
|