|
|
@ -273,11 +273,8 @@ def uuid_search_mp(results): |
|
|
|
uuid = results[i]["texts"]["id"] |
|
|
|
|
|
|
|
result = uuid_search(uuid) |
|
|
|
if result["code"] == 200: |
|
|
|
if result["text"] != "": |
|
|
|
results_list[i] = result["text"] |
|
|
|
else: |
|
|
|
results_list[i] = "Empty character" |
|
|
|
if result["code"] == 200 or result["code"] == 500: |
|
|
|
results_list[i] = result["text"] |
|
|
|
time.sleep(3) |
|
|
|
return results_list |
|
|
|
|
|
|
@ -626,10 +623,9 @@ def classify(): # 调用模型,设置最大batch_size |
|
|
|
if text_type == 'focus': |
|
|
|
texts_list = main(texts) |
|
|
|
elif text_type == 'chapter': |
|
|
|
# try: |
|
|
|
texts_list = main(texts) |
|
|
|
# except: |
|
|
|
# texts_list = [] |
|
|
|
|
|
|
|
texts_list = main(texts) |
|
|
|
|
|
|
|
else: |
|
|
|
texts_list = [] |
|
|
|
if texts_list != []: |
|
|
|