gagan3012 commited on
Commit
755cdec
·
1 Parent(s): 3eb719d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -62,7 +62,7 @@ def predict_nougat(img, model_name="facebook/nougat-small"):
62
  processor = NougatProcessor.from_pretrained(model_name)
63
  model = VisionEncoderDecoderModel.from_pretrained(model_name)
64
  image = img.convert("RGB")
65
- pixel_values = processor(image, return_tensors="pt").pixel_values
66
 
67
  # generate transcription (here we only generate 30 tokens)
68
  outputs = model.generate(
 
62
  processor = NougatProcessor.from_pretrained(model_name)
63
  model = VisionEncoderDecoderModel.from_pretrained(model_name)
64
  image = img.convert("RGB")
65
+ pixel_values = processor(image, return_tensors="pt", data_format="channels_first").pixel_values
66
 
67
  # generate transcription (here we only generate 30 tokens)
68
  outputs = model.generate(