Jeff Chen commited on
Commit
a31cbcf
1 Parent(s): 95d1370

change compatible version by `getattr`?

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. main.py +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🤩
4
  colorFrom: blue
5
  colorTo: green
6
  sdk: streamlit
7
- sdk_version: 1.18.0
8
  app_file: main.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: blue
5
  colorTo: green
6
  sdk: streamlit
7
+ sdk_version: 1.17.0
8
  app_file: main.py
9
  pinned: false
10
  license: mit
main.py CHANGED
@@ -25,7 +25,7 @@ device = ("cuda"
25
  logging.info(C("[INFO] "f"device = {device}"))
26
 
27
  # ------------------ INITITALIZE ------------------- #
28
- @st.cache_resource
29
  def model_init():
30
  tokenizer = AutoTokenizer.from_pretrained(
31
  "ckip-joint/bloom-1b1-zh")
 
25
  logging.info(C("[INFO] "f"device = {device}"))
26
 
27
  # ------------------ INITITALIZE ------------------- #
28
+ @getattr(st, "cache_resource", st.cache)
29
  def model_init():
30
  tokenizer = AutoTokenizer.from_pretrained(
31
  "ckip-joint/bloom-1b1-zh")