Spaces:
Runtime error
Runtime error
Update app.py
Browse files162 unmodified lines163164165166167168169162 unmodified lines# Function to generate textdef ocr_correction(prompt, max_new_tokens=600, num_threads=os.cpu_count()):prompt = f"""### Text ###\n{prompt}\n\n\n### Correction ###\n"""input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)162 unmodified lines163164165166167168169162 unmodified lines# Function to generate textdef ocr_correction(prompt, max_new_tokens=600, num_threads=os.cpu_count()):prompt = f"""### Text ###\n{prompt}\n\n\n### Correction ###\n"""input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)
app.py+1-1