joshuadunlop commited on
Commit
afb85a7
·
1 Parent(s): cdf31a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -153,6 +153,8 @@ recommender = SemanticSearch()
153
  title = 'PDF GPT'
154
  description = """ PDF GPT allows you to chat with your PDF file using Universal Sentence Encoder and Open AI. It gives hallucination free response than other tools as the embeddings are better than OpenAI. The returned response can even cite the page number in square brackets([]) where the information is located, adding credibility to the responses and helping to locate pertinent information quickly."""
155
 
 
 
156
  with gr.Blocks() as demo:
157
 
158
  gr.Markdown(f'<center><h1>{title}</h1></center>')
@@ -175,7 +177,7 @@ with gr.Blocks() as demo:
175
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
176
 
177
  with gr.Sidebar():
178
- openAI_key=gr.Textbox(label='Enter your OpenAI API key here')
179
 
180
  #openai.api_key = os.getenv('Your_Key_Here')
181
  demo.launch()
 
153
  title = 'PDF GPT'
154
  description = """ PDF GPT allows you to chat with your PDF file using Universal Sentence Encoder and Open AI. It gives hallucination free response than other tools as the embeddings are better than OpenAI. The returned response can even cite the page number in square brackets([]) where the information is located, adding credibility to the responses and helping to locate pertinent information quickly."""
155
 
156
+ openAI_key=gr.Textbox(label='Enter your OpenAI API key here')
157
+
158
  with gr.Blocks() as demo:
159
 
160
  gr.Markdown(f'<center><h1>{title}</h1></center>')
 
177
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
178
 
179
  with gr.Sidebar():
180
+ gr.Interface(inputs=openAI_key)
181
 
182
  #openai.api_key = os.getenv('Your_Key_Here')
183
  demo.launch()