update the restarting logic
Browse files
app.py
CHANGED
@@ -40,10 +40,13 @@ for item in truth_data:
|
|
40 |
def update_logs():
|
41 |
global LAST_LOG_UPDATE
|
42 |
global logs
|
43 |
-
if logs is None or time.time() - LAST_LOG_UPDATE > 3600:
|
|
|
44 |
# update logs for every 60 minutes
|
45 |
logs = load_dataset("commonsense-index-dev/DemoFeedback", split="train")
|
46 |
LAST_LOG_UPDATE = time.time()
|
|
|
|
|
47 |
|
48 |
def get_random_question(user_name="Anonymous"):
|
49 |
global logs
|
|
|
40 |
def update_logs():
|
41 |
global LAST_LOG_UPDATE
|
42 |
global logs
|
43 |
+
# if logs is None or time.time() - LAST_LOG_UPDATE > 3600:
|
44 |
+
if logs is None:
|
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"):
|
52 |
global logs
|