Spaces:
Runtime error
Runtime error
lanzhiwang
commited on
Commit
•
164ce9d
1
Parent(s):
35b0175
test
Browse files
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
|
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/",
|