Answer the question
In order to leave comments, you need to log in
Why is file not being processed by opencv from Django form?
Uploading a file using forms in Django and trying to process it. In the following way:
[PYTHON]
if form.is_valid():
rb = form.save(commit=False)
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR5\tesseract.exe'
rb.text = pytesseract.image_to_string(Image.open(rb.image), lang='rus')
im = cv2.imread(rb.image)
rb.for_what= rec(rb.image)
rb.delegate= 's'
rb.date = 's'
rb.delegate = 'f'
rb = form.save()
return redirect('main:profile')
[/PYTHON]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question