andriydovgal commited on
Commit
c78fa6e
·
1 Parent(s): 4256967

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
9
  def construct_index(directory_path):
10
  max_input_size = 4096
11
  num_outputs = 512
12
- max_chunk_overlap = 20
13
  chunk_size_limit = 600
14
 
15
  prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
@@ -26,7 +26,7 @@ def construct_index(directory_path):
26
 
27
  def chatbot(input_text):
28
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
29
- response = index.query(input_text, response_mode="compact")
30
  return response.response
31
 
32
  iface = gr.Interface(fn=chatbot,
 
9
  def construct_index(directory_path):
10
  max_input_size = 4096
11
  num_outputs = 512
12
+ max_chunk_overlap = 30
13
  chunk_size_limit = 600
14
 
15
  prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
 
26
 
27
  def chatbot(input_text):
28
  index = GPTSimpleVectorIndex.load_from_disk('index.json')
29
+ response = index.query(input_text)
30
  return response.response
31
 
32
  iface = gr.Interface(fn=chatbot,