Your Name commited on
Commit
a04fa10
β€’
1 Parent(s): ba7c6d0

Initial commit

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -162,9 +162,16 @@ def get_correction(input_text):
162
 
163
  if __name__ == "__main__":
164
 
165
- st.title('Gramformer')
166
- st.subheader('A framework for correcting english grammatical errors')
167
- st.markdown("Built for fun with πŸ’™ by Prithivi Da, The maker of [WhatTheFood](https://huggingface.co/spaces/prithivida/WhatTheFood), [Styleformer](https://github.com/PrithivirajDamodaran/Styleformer) and [Parrot paraphraser](https://github.com/PrithivirajDamodaran/Parrot_Paraphraser) | ✍️ [@prithivida](https://twitter.com/prithivida) |[[GitHub]](https://github.com/PrithivirajDamodaran)", unsafe_allow_html=True)
 
 
 
 
 
 
 
168
 
169
  examples = [
170
  "what be the reason for everyone leave the comapny",
@@ -187,6 +194,7 @@ if __name__ == "__main__":
187
  nlp = en_core_web_sm.load()
188
  annotator = errant.load('en', nlp)
189
 
 
190
  input_text = st.selectbox(
191
  label="Choose an example",
192
  options=examples
 
162
 
163
  if __name__ == "__main__":
164
 
165
+ st.title('Gramformer - A Python library')
166
+ st.subheader('To detect and correct grammar errors')
167
+ st.markdown("Built with πŸ’™ by Prithivi Da, The maker of [WhatTheFood](https://huggingface.co/spaces/prithivida/WhatTheFood), [Styleformer](https://github.com/PrithivirajDamodaran/Styleformer) and [Parrot paraphraser](https://github.com/PrithivirajDamodaran/Parrot_Paraphraser) | [Checkout the GitHub page for details](https://github.com/PrithivirajDamodaran/Gramformer) | ✍️ [@prithivida](https://twitter.com/prithivida) ", unsafe_allow_html=True)
168
+ st.markdown("""
169
+ **Integrate with your app with just 2 lines of code**
170
+ ```python
171
+ gf = Gramformer(models = 1, use_gpu=False)
172
+ corrected_sentences = gf.correct(influent_sentence, max_candidates=1)
173
+ ```
174
+ """)
175
 
176
  examples = [
177
  "what be the reason for everyone leave the comapny",
 
194
  nlp = en_core_web_sm.load()
195
  annotator = errant.load('en', nlp)
196
 
197
+ st.markdown(f'##### Try it now:')
198
  input_text = st.selectbox(
199
  label="Choose an example",
200
  options=examples