Spaces:
Runtime error
Runtime error
File size: 437 Bytes
41f493e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import streamlit as st
import language_tool_python
@st.cache(allow_output_mutation=True)
def get_model():
tool = language_tool_python.LanguageTool('en-US')
return tool
tool = get_model()
with st.form(key='my_form'):
prompt = st.text_area(label='Enter sentence', value=g, height=500)
submit_button = st.form_submit_button(label='Submit')
if submit_button:
matches = tool.correct(prompt)
st.write(matches) |