Commit 6ad04c42 authored by 李小芳's avatar 李小芳

grey

parent 61225f96
...@@ -225,13 +225,16 @@ def get_answers(pks): ...@@ -225,13 +225,16 @@ def get_answers(pks):
else: else:
item['selected_content_type'] = -1 item['selected_content_type'] = -1
else: else:
result_data = alo_model.run(answer.content) try:
item['selected_content_type'] = int(result_data.get("content_type", 0)) result_data = alo_model.run(answer.content)
item['selected_internet_celebrity'] = [list(item.keys())[0] for item in item['selected_content_type'] = int(result_data.get("content_type", 0))
result_data.get("celebrity", [])] item['selected_internet_celebrity'] = [list(item.keys())[0] for item in
item['selected_stars'] = [list(item.keys())[0] for item in result_data.get("star", [])] result_data.get("celebrity", [])]
projects = [list(item.keys())[0] for item in result_data.get("projects", [])] item['selected_stars'] = [list(item.keys())[0] for item in result_data.get("star", [])]
item['portrait_tag_name'].extend(projects) projects = [list(item.keys())[0] for item in result_data.get("projects", [])]
item['portrait_tag_name'].extend(projects)
except:
pass
if 3315 in item['operators_add_tags']: if 3315 in item['operators_add_tags']:
item['new_smr'] = answer.get_answer_newuser_smr(answer_id=answer.id) item['new_smr'] = answer.get_answer_newuser_smr(answer_id=answer.id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment