Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,6 @@ checkpoints = [
|
|
15 |
]
|
16 |
|
17 |
|
18 |
-
@st.cache
|
19 |
-
def initialize_spacy(model="en"):
|
20 |
-
spacy.cli.download(model) # type: ignore
|
21 |
-
return True
|
22 |
-
|
23 |
-
|
24 |
@st.cache(suppress_st_warning=True, allow_output_mutation=True)
|
25 |
def get_model(model_name):
|
26 |
return HappyTextToText("T5", model_name)
|
@@ -51,7 +45,6 @@ def main():
|
|
51 |
"""This writing assistant will proofread any text for you! See my [GitHub repo](https://github.com/aseifert/hf-writing-assistant) for implementation details."""
|
52 |
)
|
53 |
|
54 |
-
initialize_spacy()
|
55 |
annotator = get_annotator("en")
|
56 |
checkpoint = st.selectbox("Choose model", checkpoints)
|
57 |
model = get_model(checkpoint)
|
|
|
15 |
]
|
16 |
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
@st.cache(suppress_st_warning=True, allow_output_mutation=True)
|
19 |
def get_model(model_name):
|
20 |
return HappyTextToText("T5", model_name)
|
|
|
45 |
"""This writing assistant will proofread any text for you! See my [GitHub repo](https://github.com/aseifert/hf-writing-assistant) for implementation details."""
|
46 |
)
|
47 |
|
|
|
48 |
annotator = get_annotator("en")
|
49 |
checkpoint = st.selectbox("Choose model", checkpoints)
|
50 |
model = get_model(checkpoint)
|