Davide Fiocco commited on
Commit
7bdd50b
1 Parent(s): abbccac

Avoid caching context

Browse files
Files changed (1) hide show
  1. utils.py +1 -2
utils.py CHANGED
@@ -23,7 +23,6 @@ def get_answer(input, context, engine, threshold=0.4):
23
  )
24
 
25
 
26
- @st.cache
27
  def get_context():
28
 
29
  BIRTHYEAR = 1952
@@ -35,7 +34,7 @@ def get_context():
35
  context = (
36
  json.load(f)["info"]
37
  .replace("[YEAR]", str(now.year))
38
- .replace("[TODAY]", f"{datetime.datetime.now():%d-%m-%Y}")
39
  .replace("[BIRTHYEAR]", str(BIRTHYEAR))
40
  .replace(
41
  "[AGE]",
 
23
  )
24
 
25
 
 
26
  def get_context():
27
 
28
  BIRTHYEAR = 1952
 
34
  context = (
35
  json.load(f)["info"]
36
  .replace("[YEAR]", str(now.year))
37
+ .replace("[TODAY]", f"{now:%d-%m-%Y}")
38
  .replace("[BIRTHYEAR]", str(BIRTHYEAR))
39
  .replace(
40
  "[AGE]",