BigSalmon commited on
Commit
41f493e
·
1 Parent(s): 9ad6c1f

Create new file

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import language_tool_python
3
+
4
+ @st.cache(allow_output_mutation=True)
5
+ def get_model():
6
+ tool = language_tool_python.LanguageTool('en-US')
7
+ return tool
8
+
9
+ tool = get_model()
10
+
11
+ with st.form(key='my_form'):
12
+ prompt = st.text_area(label='Enter sentence', value=g, height=500)
13
+ submit_button = st.form_submit_button(label='Submit')
14
+ if submit_button:
15
+ matches = tool.correct(prompt)
16
+ st.write(matches)