Spaces:
Running
Running
Update app.py
Browse files5 unmodified lines6789101125 unmodified lines373839404142435 unmodified linesfrom PIL import Imageimport gradio as grdef download_image(url, save_path):"""Download an image from a specified URL and save it to the specified path25 unmodified linesdownload_image(image_url, "example.jpg")def inference(img, lang):ocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)img_path = imgresult = ocr.ocr(img_path, cls=True)[0]image = Image.open(img_path).convert('RGB')5 unmodified lines67891011121325 unmodified lines394041424344455 unmodified linesfrom PIL import Imageimport gradio as grocr = PaddleOCR(use_angle_cls=True, lang=lang,use_gpu=False)def download_image(url, save_path):"""Download an image from a specified URL and save it to the specified path25 unmodified linesdownload_image(image_url, "example.jpg")def inference(img, lang):img_path = imgresult = ocr.ocr(img_path, cls=True)[0]image = Image.open(img_path).convert('RGB')
app.py+3-1