mrozenva commited on
Commit
9e73bfb
1 Parent(s): 5d12b6f

New Changes

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -197,10 +197,10 @@ def question_answer(url, file, question,openAI_key):
197
 
198
  recommender = SemanticSearch()
199
 
200
- title = 'PDF GPT'
201
- description = """ What is PDF GPT ?
202
- 1. The problem is that Open AI has a 4K token limit and cannot take an entire PDF file as input. Additionally, it sometimes returns irrelevant responses due to poor embeddings. ChatGPT cannot directly talk to external data. The solution is PDF GPT, which allows you to chat with an uploaded PDF file using GPT functionalities. The application breaks the document into smaller chunks and generates embeddings using a powerful Deep Averaging Network Encoder. A semantic search is performed on your query, and the top relevant chunks are used to generate a response.
203
- 2. 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. The Responses are much better than the naive responses by Open AI."""
204
 
205
  with gr.Blocks() as demo:
206
 
@@ -220,7 +220,7 @@ with gr.Blocks() as demo:
220
  btn.style(full_width=True)
221
 
222
  with gr.Group():
223
- answer = gr.Textbox(label='The answer to your question is :')
224
 
225
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
226
  #openai.api_key = os.getenv('Your_Key_Here')
 
197
 
198
  recommender = SemanticSearch()
199
 
200
+ title = 'Chat with Your PDFs'
201
+ description = """ Instructions
202
+ 1. Input your API Key
203
+ 2. Upload PDF"""
204
 
205
  with gr.Blocks() as demo:
206
 
 
220
  btn.style(full_width=True)
221
 
222
  with gr.Group():
223
+ answer = gr.Textbox(label='Answer :')
224
 
225
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
226
  #openai.api_key = os.getenv('Your_Key_Here')