Spaces:
Runtime error
Runtime error
File size: 420 Bytes
4bdccb8 34cb731 f6cc9b4 34cb731 3ec112a f6cc9b4 34cb731 f6cc9b4 |
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=" ")
submit_button = st.form_submit_button(label='Submit')
if submit_button:
m = tool.correct(prompt)
st.write(m) |