Your Name commited on
Commit
d32a52c
1 Parent(s): 85d85d8
crazy_functions/批量翻译PDF文档_多线程.py CHANGED
@@ -192,7 +192,7 @@ def request_gpt_model_in_new_thread_with_ui_alive(inputs, inputs_show_user, top_
192
  yield chatbot, [], msg
193
  return future.result()
194
 
195
- def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(inputs_array, inputs_show_user_array, top_p, temperature, chatbot, history_array, sys_prompt_array, refresh_interval, max_workers=10, scroller_max_len=30):
196
  import time
197
  from concurrent.futures import ThreadPoolExecutor
198
  from request_llm.bridge_chatgpt import predict_no_ui_long_connection
@@ -275,7 +275,8 @@ def 解析PDF(file_manifest, project_folder, top_p, temperature, chatbot, histor
275
  max_workers=16 # OpenAI所允许的最大并行过载
276
  )
277
 
278
- final = ["", paper_meta_info + '\n\n---\n\n---\n\n---\n\n'].extend(gpt_response_collection)
 
279
  res = write_results_to_file(final)
280
  chatbot.append((f"{fp}完成了吗?", res)); msg = "完成"
281
  yield chatbot, history, msg
 
192
  yield chatbot, [], msg
193
  return future.result()
194
 
195
+ def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(inputs_array, inputs_show_user_array, top_p, temperature, chatbot, history_array, sys_prompt_array, refresh_interval=0.2, max_workers=10, scroller_max_len=30):
196
  import time
197
  from concurrent.futures import ThreadPoolExecutor
198
  from request_llm.bridge_chatgpt import predict_no_ui_long_connection
 
275
  max_workers=16 # OpenAI所允许的最大并行过载
276
  )
277
 
278
+ final = ["", paper_meta_info + '\n\n---\n\n---\n\n---\n\n']
279
+ final.extend(gpt_response_collection)
280
  res = write_results_to_file(final)
281
  chatbot.append((f"{fp}完成了吗?", res)); msg = "完成"
282
  yield chatbot, history, msg