liqian 2 years ago
parent
commit
6dfbdac116
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ad_recommend.py

+ 2 - 2
ad_recommend.py

@@ -10,7 +10,7 @@ def ad_recommend_predict(mid, video_id):
     广告推荐预测
     :param mid: mid
     :param video_id: video_id
-    :return: ad_predict, type-int, 1-发放广告,0-不发放广告
+    :return: ad_predict, type-int, 1-发放广告,2-不发放广告
     """
     now_date = datetime.datetime.today()
     now_dt = datetime.datetime.strftime(now_date, '%Y%m%d')
@@ -48,6 +48,6 @@ def ad_recommend_predict(mid, video_id):
     if mid_video_share_rate > threshold:
         ad_predict = 1
     else:
-        ad_predict = 0
+        ad_predict = 2
     result = {'mid_video_share_rate': mid_video_share_rate, 'threshold': threshold, 'ad_predict': ad_predict}
     return result