Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|