shreddedpork commited on
Commit
67401ba
·
verified ·
1 Parent(s): cf00f17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -14,6 +14,8 @@ model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
14
  processor = AutoProcessor.from_pretrained(local_path)
15
 
16
  # Function to process image and text and generate the output
 
 
17
  def generate_output(image, text, button_click):
18
  # Prepare input data
19
  messages = [
 
14
  processor = AutoProcessor.from_pretrained(local_path)
15
 
16
  # Function to process image and text and generate the output
17
+ @torch.inference_mode()
18
+ @spaces.GPU(duration=120) # Specify a duration to avoid timeout
19
  def generate_output(image, text, button_click):
20
  # Prepare input data
21
  messages = [