ovi054 commited on
Commit
446e43e
1 Parent(s): 029098a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
6
  florence_model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True).to(device).eval()
7
  florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True)
8
 
9
- def generate_caption():
10
  if not isinstance(image, Image.Image):
11
  image = Image.fromarray(image)
12
 
 
6
  florence_model = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True).to(device).eval()
7
  florence_processor = AutoProcessor.from_pretrained('microsoft/Florence-2-base', trust_remote_code=True)
8
 
9
+ def generate_caption(image):
10
  if not isinstance(image, Image.Image):
11
  image = Image.fromarray(image)
12