Spaces:
Running
on
Zero
Running
on
Zero
Update utils/florence.py
Browse files- utils/florence.py +0 -2
utils/florence.py
CHANGED
@@ -49,7 +49,6 @@ def run_florence_inference(
|
|
49 |
else:
|
50 |
prompt = task
|
51 |
inputs = processor(text=prompt, images=image, return_tensors="pt").to(device)
|
52 |
-
print(inputs)
|
53 |
generated_ids = model.generate(
|
54 |
input_ids=inputs["input_ids"],
|
55 |
pixel_values=inputs["pixel_values"],
|
@@ -60,5 +59,4 @@ def run_florence_inference(
|
|
60 |
generated_ids, skip_special_tokens=False)[0]
|
61 |
response = processor.post_process_generation(
|
62 |
generated_text, task=task, image_size=image.size)
|
63 |
-
print(generated_text, response)
|
64 |
return generated_text, response
|
|
|
49 |
else:
|
50 |
prompt = task
|
51 |
inputs = processor(text=prompt, images=image, return_tensors="pt").to(device)
|
|
|
52 |
generated_ids = model.generate(
|
53 |
input_ids=inputs["input_ids"],
|
54 |
pixel_values=inputs["pixel_values"],
|
|
|
59 |
generated_ids, skip_special_tokens=False)[0]
|
60 |
response = processor.post_process_generation(
|
61 |
generated_text, task=task, image_size=image.size)
|
|
|
62 |
return generated_text, response
|