raynardj commited on
Commit
b469810
1 Parent(s): 6f9a61a

⭐️ cache bug

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -27,13 +27,14 @@ def inference(text):
27
 
28
  import streamlit as st
29
 
30
- st.title("Wenyanwen Translator")
31
  st.markdown("""
32
- # Translate from Chinese to Ancient Chinese / 还你古朴清雅壮丽的文言文, 这[github](https://github.com/raynardj/yuan)
33
- 最多100个中文字符, 谢谢!
 
34
  """)
35
 
36
- @st.cache
37
  def load_model():
38
  tokenizer = AutoTokenizer.from_pretrained(PRETRAINED)
39
  model = EncoderDecoderModel.from_pretrained(PRETRAINED)
 
27
 
28
  import streamlit as st
29
 
30
+ st.title("古朴 清雅 壮丽")
31
  st.markdown("""
32
+ > Translate from Chinese to Ancient Chinese / 还你古朴清雅壮丽的文言文, 这[github](https://github.com/raynardj/yuan)
33
+
34
+ > 最多100个中文字符, 谢谢!
35
  """)
36
 
37
+ @st.cache(allow_output_mutation=True)
38
  def load_model():
39
  tokenizer = AutoTokenizer.from_pretrained(PRETRAINED)
40
  model = EncoderDecoderModel.from_pretrained(PRETRAINED)