rynmurdock commited on
Commit
4150b01
1 Parent(s): 4769988

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -145,7 +145,7 @@ def to_wanted_embs(image_outputs, input_ids, attention_mask, cache_position=None
145
 
146
 
147
  # TODO cache descriptions?
148
- @spaces.GPU()
149
  def generate_pali(n_embs):
150
  prompt = 'caption en'
151
  model_inputs = processor(text=prompt, images=torch.zeros(1, 3, 224, 224), return_tensors="pt")
@@ -180,7 +180,7 @@ def generate_pali(n_embs):
180
 
181
 
182
 
183
- @spaces.GPU()
184
  def generate_gpu(in_im_embs, prompt='the scene'):
185
  with torch.no_grad():
186
  in_im_embs = in_im_embs.to('cuda').unsqueeze(0).unsqueeze(0)
 
145
 
146
 
147
  # TODO cache descriptions?
148
+ @spaces.GPU(duration=20)
149
  def generate_pali(n_embs):
150
  prompt = 'caption en'
151
  model_inputs = processor(text=prompt, images=torch.zeros(1, 3, 224, 224), return_tensors="pt")
 
180
 
181
 
182
 
183
+ @spaces.GPU(duration=20)
184
  def generate_gpu(in_im_embs, prompt='the scene'):
185
  with torch.no_grad():
186
  in_im_embs = in_im_embs.to('cuda').unsqueeze(0).unsqueeze(0)