import replicate

class GrammarCorrector:
    def __init__(self):
        self.model = "aaurelions/t5-grammar-corrector:4502e6d4714acf2152cd417a63792f3a59e983d440b9aa4c8df9b5d84a72931f"

    def correct(self, text):
        output = replicate.run(
            self.model,
            input={"text": text}
        )
        return output
