Spaces:
Runtime error
Runtime error
lanzhiwang
commited on
Commit
•
dced84d
1
Parent(s):
68c79c0
test
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ 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 +118,7 @@ lang_id = {
|
|
118 |
}
|
119 |
|
120 |
|
121 |
-
@st.
|
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.cache(suppress_st_warning=True, allow_output_mutation=True)
|
15 |
st.set_page_config(page_title="M2M100 Translator")
|
16 |
|
17 |
lang_id = {
|
|
|
118 |
}
|
119 |
|
120 |
|
121 |
+
@st.cache_data(suppress_st_warning=True, allow_output_mutation=True)
|
122 |
def load_model(
|
123 |
pretrained_model: str = "facebook/m2m100_1.2B",
|
124 |
cache_dir: str = "models/",
|