ammarnasr commited on
Commit
0b538ce
·
1 Parent(s): 270809d
Files changed (1) hide show
  1. utils.py +3 -0
utils.py CHANGED
@@ -15,6 +15,7 @@ import random
15
  import string
16
  import os
17
  from datetime import datetime, timedelta
 
18
 
19
  TOKEN_FILE = "tokens.txt"
20
  EXPIRED_FILE = "tokens_expired.txt"
@@ -62,6 +63,8 @@ def load_expired_tokens(expired_file=EXPIRED_FILE):
62
  with open(expired_file, 'r') as f:
63
  for line in f:
64
  print(line)
 
 
65
  token, expiry_date = line.strip().split(',')
66
  expired_tokens[token] = datetime.fromisoformat(expiry_date)
67
  return expired_tokens
 
15
  import string
16
  import os
17
  from datetime import datetime, timedelta
18
+ import streamlit as st
19
 
20
  TOKEN_FILE = "tokens.txt"
21
  EXPIRED_FILE = "tokens_expired.txt"
 
63
  with open(expired_file, 'r') as f:
64
  for line in f:
65
  print(line)
66
+ st.write(line)
67
+ st.write(line.strip().split(','))
68
  token, expiry_date = line.strip().split(',')
69
  expired_tokens[token] = datetime.fromisoformat(expiry_date)
70
  return expired_tokens