lanzhiwang commited on
Commit
164ce9d
1 Parent(s): 35b0175
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -11,7 +11,6 @@ else:
11
  device = torch.device("cpu")
12
  logging.warning("GPU not found, using CPU, translation will be very slow.")
13
 
14
- # st.cache(suppress_st_warning=True, allow_output_mutation=True)
15
  st.set_page_config(page_title="M2M100 Translator")
16
 
17
  lang_id = {
@@ -118,7 +117,7 @@ lang_id = {
118
  }
119
 
120
 
121
- @st.cache_data(allow_output_mutation=True)
122
  def load_model(
123
  pretrained_model: str = "facebook/m2m100_1.2B",
124
  cache_dir: str = "models/",
 
11
  device = torch.device("cpu")
12
  logging.warning("GPU not found, using CPU, translation will be very slow.")
13
 
 
14
  st.set_page_config(page_title="M2M100 Translator")
15
 
16
  lang_id = {
 
117
  }
118
 
119
 
120
+ @st.cache_data
121
  def load_model(
122
  pretrained_model: str = "facebook/m2m100_1.2B",
123
  cache_dir: str = "models/",