BilalHasan commited on
Commit
560dd1d
1 Parent(s): 7f7be12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -5,6 +5,9 @@ from concurrent.futures import ProcessPoolExecutor
5
  from openai import OpenAI
6
  import gradio as gr
7
 
 
 
 
8
 
9
  def preprocess_image(image):
10
  gray_image = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
 
5
  from openai import OpenAI
6
  import gradio as gr
7
 
8
+ processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-handwritten')
9
+ model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-handwritten')
10
+
11
 
12
  def preprocess_image(image):
13
  gray_image = cv.cvtColor(image, cv.COLOR_BGR2GRAY)