diff --git a/api.py b/api.py index 3e09e01..bd13f58 100644 --- a/api.py +++ b/api.py @@ -47,7 +47,6 @@ def pdf_to_text(path, start_page=1, end_page=None): def text_to_chunks(texts, word_length=150, start_page=1): text_toks = [t.split(' ') for t in texts] - page_nums = [] chunks = [] for idx, words in enumerate(text_toks): diff --git a/app.py b/app.py index 7827249..04a3a6a 100644 --- a/app.py +++ b/app.py @@ -16,10 +16,10 @@ def ask_api( return '[ERROR]: Invalid API Host' if url.strip() == '' and file == None: - return '[ERROR]: Both URL and PDF is empty. Provide atleast one.' + return '[ERROR]: Both URL and PDF is empty. Provide at least one.' if url.strip() != '' and file != None: - return '[ERROR]: Both URL and PDF is provided. Please provide only one (eiter URL or PDF).' + return '[ERROR]: Both URL and PDF is provided. Please provide only one (either URL or PDF).' if question.strip() == '': return '[ERROR]: Question field is empty' @@ -66,7 +66,7 @@ with gr.Blocks() as demo: placeholder='http://localhost:8080', ) gr.Markdown( - f'

Get your Open AI API key here

' + '

Get your Open AI API key here

' ) openAI_key = gr.Textbox( label='Enter your OpenAI API key here', type='password'