freexyan commited on
Commit
2ade397
·
1 Parent(s): ce4b97f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -195,8 +195,6 @@ with gr.Blocks() as demo:
195
  with gr.Row():
196
 
197
  with gr.Group():
198
- 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>')
199
- openAI_key=gr.Textbox(label='Enter your OpenAI API key here')
200
  url = gr.Textbox(label='Enter PDF URL here')
201
  gr.Markdown("<center><h4>OR<h4></center>")
202
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
@@ -207,8 +205,8 @@ with gr.Blocks() as demo:
207
  with gr.Group():
208
  answer = gr.Textbox(label='The answer to your question is :')
209
 
 
210
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
211
- #openai.api_key = os.getenv('Your_Key_Here')
212
  demo.launch()
213
 
214
 
 
195
  with gr.Row():
196
 
197
  with gr.Group():
 
 
198
  url = gr.Textbox(label='Enter PDF URL here')
199
  gr.Markdown("<center><h4>OR<h4></center>")
200
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
 
205
  with gr.Group():
206
  answer = gr.Textbox(label='The answer to your question is :')
207
 
208
+ openai.api_key = os.getenv('Your_Key_Here')
209
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
 
210
  demo.launch()
211
 
212