Spaces:
Build error
Build error
| from rpunct import RestorePuncts | |
| print("Loading Model...") | |
| rpunct = RestorePuncts() | |
| from fastapi import FastAPI | |
| app = FastAPI() | |
| print("Models loaded !") | |
| def read_root(): | |
| return {"Homepage!"} | |
| def get_correction(input_sentence): | |
| '''Returns sentence with correct punctuations and case''' | |
| return {"corrected_sentence": rpunct.punctuate(input_sentence, lang="en")} |