merve HF staff commited on
Commit
87c129a
1 Parent(s): 7c259fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,6 +8,7 @@ import torch
8
  import gradio as gr
9
  import uuid
10
  import os
 
11
 
12
  processor = NougatProcessor.from_pretrained("facebook/nougat-small")
13
  model = VisionEncoderDecoderModel.from_pretrained("facebook/nougat-small")
@@ -49,7 +50,7 @@ def predict(image):
49
  return page_sequence
50
 
51
 
52
-
53
  def inference(pdf_file, pdf_link):
54
  if pdf_file is None:
55
  if pdf_link == '':
 
8
  import gradio as gr
9
  import uuid
10
  import os
11
+ import spaces
12
 
13
  processor = NougatProcessor.from_pretrained("facebook/nougat-small")
14
  model = VisionEncoderDecoderModel.from_pretrained("facebook/nougat-small")
 
50
  return page_sequence
51
 
52
 
53
+ @spaces.GPU
54
  def inference(pdf_file, pdf_link):
55
  if pdf_file is None:
56
  if pdf_link == '':