xl2533 commited on
Commit
87708a3
1 Parent(s): 2ab12ec

remove modle

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -28,15 +28,14 @@ faiss_store = './output/'
28
  global doc_search
29
 
30
 
31
- def process(files, openai_api_key, max_tokens, model, n_sample):
32
  """
33
  对文档处理进行摘要,构建问题,构建文档索引
34
  """
35
- model = model[0]
36
  os.environ['OPENAI_API_KEY'] = openai_api_key
37
  print('Displaying uploading files ')
38
  print(glob('/tmp/*'))
39
- docs = process_files([i.name for i in files], model, max_tokens)
40
  print('Display Faiss index')
41
  print(glob('./output/*'))
42
  question = get_question(docs, openai_api_key, max_tokens, n_sample)
 
28
  global doc_search
29
 
30
 
31
+ def process(files, openai_api_key, max_tokens, n_sample):
32
  """
33
  对文档处理进行摘要,构建问题,构建文档索引
34
  """
 
35
  os.environ['OPENAI_API_KEY'] = openai_api_key
36
  print('Displaying uploading files ')
37
  print(glob('/tmp/*'))
38
+ docs = process_files([i.name for i in files], 'openai', max_tokens)
39
  print('Display Faiss index')
40
  print(glob('./output/*'))
41
  question = get_question(docs, openai_api_key, max_tokens, n_sample)