Spaces:
Runtime error
Runtime error
Update app.py
Browse files6 unmodified lines789101112132 unmodified lines161718192021226 unmodified linesfrom concurrent.futures import ThreadPoolExecutorimport osdescription = """# 👋🏻Welcome to Tonic's On-Device📲⌚🎅🏻OCR Corrector (CPU)📲⌚🎅🏻OCRonos-Vintage is a small specialized model for OCR correction of cultural heritage archives pre-trained with llm.c. OCRonos-Vintage is only 124 million parameters. It can run easily on CPU or provide correction at scale on GPUs (>10k tokens/seconds) while providing a quality of correction comparable to GPT-4 or the llama version of OCRonos for English-speaking cultural archives.### Join us :2 unmodified linesmodel_name = "PleIAs/OCRonos-Vintage"device = "cuda" if torch.cuda.is_available() else "cpu"🙋🏻♂️Welcome to Tonic's ⌚🎅🏻Vintage OCRonos Corrector (CPU)model = GPT2LMHeadModel.from_pretrained(model_name).to(device)tokenizer = GPT2Tokenizer.from_pretrained(model_name)6 unmodified lines789101112132 unmodified lines1617181920216 unmodified linesfrom concurrent.futures import ThreadPoolExecutorimport osdescription = """# 🙋🏻♂️Welcome to Tonic's On-Device📲⌚🎅🏻OCR Corrector (CPU)📲⌚🎅🏻OCRonos-Vintage is a small specialized model for OCR correction of cultural heritage archives pre-trained with llm.c. OCRonos-Vintage is only 124 million parameters. It can run easily on CPU or provide correction at scale on GPUs (>10k tokens/seconds) while providing a quality of correction comparable to GPT-4 or the llama version of OCRonos for English-speaking cultural archives.### Join us :2 unmodified linesmodel_name = "PleIAs/OCRonos-Vintage"device = "cuda" if torch.cuda.is_available() else "cpu"model = GPT2LMHeadModel.from_pretrained(model_name).to(device)tokenizer = GPT2Tokenizer.from_pretrained(model_name)
app.py+1-2