update the visibility filter
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def update_logs():
|
|
45 |
# update logs for every 60 minutes
|
46 |
logs = load_dataset("commonsense-index-dev/DemoFeedback", split="train")
|
47 |
LAST_LOG_UPDATE = time.time()
|
48 |
-
|
49 |
update_logs()
|
50 |
|
51 |
def get_random_question(user_name="Anonymous"):
|
@@ -60,7 +60,7 @@ def get_random_question(user_name="Anonymous"):
|
|
60 |
user_seen_data = set()
|
61 |
for item in logs:
|
62 |
feedback_counts[item["question_id"]] += 1
|
63 |
-
if item["user_name"] == user_name:
|
64 |
user_seen_data.add(item["question_id"])
|
65 |
# sample a question that has the least feedback, and if there are multiple, sample randomly
|
66 |
min_feedback = min(feedback_counts.values())
|
|
|
45 |
# update logs for every 60 minutes
|
46 |
logs = load_dataset("commonsense-index-dev/DemoFeedback", split="train")
|
47 |
LAST_LOG_UPDATE = time.time()
|
48 |
+
|
49 |
update_logs()
|
50 |
|
51 |
def get_random_question(user_name="Anonymous"):
|
|
|
60 |
user_seen_data = set()
|
61 |
for item in logs:
|
62 |
feedback_counts[item["question_id"]] += 1
|
63 |
+
if True or item["user_name"] == user_name: # TODO: remove this when data is almost all annotated
|
64 |
user_seen_data.add(item["question_id"])
|
65 |
# sample a question that has the least feedback, and if there are multiple, sample randomly
|
66 |
min_feedback = min(feedback_counts.values())
|