gokaygokay commited on
Commit
001a335
·
verified ·
1 Parent(s): b5f1f22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -22,6 +22,7 @@ florence_model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base
22
  florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True)
23
 
24
  # Florence caption function
 
25
  def florence_caption(image):
26
  if not isinstance(image, Image.Image):
27
  image = Image.fromarray(image)
 
22
  florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True)
23
 
24
  # Florence caption function
25
+ @spaces.GPU
26
  def florence_caption(image):
27
  if not isinstance(image, Image.Image):
28
  image = Image.fromarray(image)