Spaces:
Sleeping
Sleeping
File size: 587 Bytes
d157479 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
from grammarcorrector import GrammarCorrector
# Initialize the GrammarCorrector
corrector = GrammarCorrector()
# Streamlit app title
st.title("Grammar Correction App")
# Input text area
user_input = st.text_area("Enter text to correct:", height=200)
# Button to trigger correction
if st.button("Correct Grammar"):
if user_input:
# Perform grammar correction
corrected_text = corrector.correct(user_input)
st.subheader("Corrected Text:")
st.write(corrected_text)
else:
st.warning("Please enter text to correct.")
|