yuchenlin commited on
Commit
81d45a8
·
1 Parent(s): 1d52f1e

update the restarting logic

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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