Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -218,6 +218,7 @@ with gr.Blocks() as demo:
|
|
218 |
###################################
|
219 |
gr.Markdown(f'<p style="text-align:center">Get your Open AI API key <a href="https://platform.openai.com/account/api-keys">here</a></p>')
|
220 |
openAI_key=gr.Textbox(label='Enter your OpenAI API key here')
|
|
|
221 |
url = gr.Textbox(label='Enter PDF URL here')
|
222 |
gr.Markdown("<center><h4>OR<h4></center>")
|
223 |
file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
|
@@ -226,5 +227,5 @@ btn = gr.Button(value='Submit')
|
|
226 |
btn.style(full_width=True)
|
227 |
answer = gr.Textbox(label='The answer to your question is :')
|
228 |
gr.Interface(fn=question_answer,
|
229 |
-
inputs=[url, file, question,openAI_key],
|
230 |
outputs=[answer]).launch()
|
|
|
218 |
###################################
|
219 |
gr.Markdown(f'<p style="text-align:center">Get your Open AI API key <a href="https://platform.openai.com/account/api-keys">here</a></p>')
|
220 |
openAI_key=gr.Textbox(label='Enter your OpenAI API key here')
|
221 |
+
useremail = gr.Textbox(label='Enter user email here')
|
222 |
url = gr.Textbox(label='Enter PDF URL here')
|
223 |
gr.Markdown("<center><h4>OR<h4></center>")
|
224 |
file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
|
|
|
227 |
btn.style(full_width=True)
|
228 |
answer = gr.Textbox(label='The answer to your question is :')
|
229 |
gr.Interface(fn=question_answer,
|
230 |
+
inputs=[useremail, url, file, question,openAI_key],
|
231 |
outputs=[answer]).launch()
|