Commit 5c0ec458 authored by 张彦钊's avatar 张彦钊

update dairyQueueUpdate file

parent 8158ed1d
......@@ -106,13 +106,6 @@ def get_score(queue_arg):
cursor.execute(sql)
result = cursor.fetchall()
score_df = pd.DataFrame(list(result)).dropna()
if score_df.empty:
print("获取的日记列表是空")
return False
else:
score_df = score_df.rename(columns = {0:"score",1:"cid"})
print("日记打分表")
print(score_df.head(1))
db.close()
return score_df
......@@ -221,11 +214,15 @@ def pipe_line(queue_name, queue_arg, device_id):
predict(queue_name, queue_arg, device_id)
predict_score_df = save_result(queue_name, queue_arg, device_id)
score_df = get_score(queue_arg)
if score_df:
if score_df.empty:
print("获取的日记列表是空")
return False
else:
score_df = score_df.rename(columns={0: "score", 1: "cid"})
print("日记打分表")
print(score_df.head(1))
diary_queue = update_dairy_queue(score_df, predict_score_df)
return diary_queue
else:
return False
def user_update(device_id,city_id,data_set_cid):
......
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