bhaskartripathi commited on
Commit
877302b
1 Parent(s): c30c7ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -49,11 +49,10 @@ def text_to_chunks(texts, word_length=150, start_page=1):
49
  text_toks[idx+1] = chunk + text_toks[idx+1]
50
  continue
51
  chunk = ' '.join(chunk).strip()
52
- chunk = f'[{idx+start_page}]' + ' ' + '"' + chunk + '"'
53
  chunks.append(chunk)
54
  return chunks
55
 
56
-
57
  class SemanticSearch:
58
 
59
  def __init__(self):
@@ -186,5 +185,4 @@ with gr.Blocks() as demo:
186
 
187
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
188
  #openai.api_key = os.getenv('Your_Key_Here')
189
- demo.launch()
190
-
 
49
  text_toks[idx+1] = chunk + text_toks[idx+1]
50
  continue
51
  chunk = ' '.join(chunk).strip()
52
+ chunk = f'[Page no. {idx+start_page}]' + ' ' + '"' + chunk + '"'
53
  chunks.append(chunk)
54
  return chunks
55
 
 
56
  class SemanticSearch:
57
 
58
  def __init__(self):
 
185
 
186
  btn.click(question_answer, inputs=[url, file, question,openAI_key], outputs=[answer])
187
  #openai.api_key = os.getenv('Your_Key_Here')
188
+ demo.launch()