Spaces:
Sleeping
Sleeping
Update ui.py
Browse files
ui.py
CHANGED
|
@@ -213,7 +213,7 @@ def ui_serve(campaign_id: str, hour: int, segment: str):
|
|
| 213 |
ctx = {"hour": int(hour), "segment": (segment or "").strip() or None}
|
| 214 |
m = _seasonal(campaign_id)
|
| 215 |
bandit = ThompsonBandit(campaign_id)
|
| 216 |
-
vid, _ = bandit.sample_arm(ctx,
|
| 217 |
if not vid:
|
| 218 |
raise gr.Error("配信可能なバリアントがありません。まずは Generate してください。")
|
| 219 |
|
|
|
|
| 213 |
ctx = {"hour": int(hour), "segment": (segment or "").strip() or None}
|
| 214 |
m = _seasonal(campaign_id)
|
| 215 |
bandit = ThompsonBandit(campaign_id)
|
| 216 |
+
vid, _ = bandit.sample_arm(ctx, m.expected_ctr)
|
| 217 |
if not vid:
|
| 218 |
raise gr.Error("配信可能なバリアントがありません。まずは Generate してください。")
|
| 219 |
|