Commit 3522b996 authored by 高雅喆's avatar 高雅喆

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

fix tab
parents 0e690597 aa7cea9f
...@@ -80,9 +80,9 @@ def predict_save_to_redis(user_profile, instance): ...@@ -80,9 +80,9 @@ def predict_save_to_redis(user_profile, instance):
add_data_to_redis(device_id,cid_list) add_data_to_redis(device_id,cid_list)
def router(device_id): def router(device_id):
user_profile, is_exist = fetch_user_profile(device_id) user_profile, not_exist = fetch_user_profile(device_id)
if is_exist: if not_exist:
print('Sorry, we don\'t have you.') print('Sorry, we don\'t have you.')
else: else:
predict(user_profile) predict(user_profile)
......
...@@ -33,4 +33,4 @@ def fetch_user_profile(device_id): ...@@ -33,4 +33,4 @@ def fetch_user_profile(device_id):
user_profile_dict = {} user_profile_dict = {}
for i in user_profile.columns: for i in user_profile.columns:
user_profile_dict[i] = user_profile.loc[0, i] user_profile_dict[i] = user_profile.loc[0, i]
return user_profile_dict, not user_profile.empty return user_profile_dict, user_profile.empty
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