Spaces:
Sleeping
Sleeping
Praveen0309
commited on
Commit
•
1ff007c
1
Parent(s):
b6597f6
Application2
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def inference(image, image_prompt):
|
|
52 |
image = image.convert("RGB") # Ensure image is RGB mode
|
53 |
|
54 |
inputs = processor(text=prompt, images=image, return_tensors="pt")
|
55 |
-
generate_ids = base_model.generate(**inputs, max_new_tokens=
|
56 |
decoded_response = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
57 |
return decoded_response
|
58 |
|
|
|
52 |
image = image.convert("RGB") # Ensure image is RGB mode
|
53 |
|
54 |
inputs = processor(text=prompt, images=image, return_tensors="pt")
|
55 |
+
generate_ids = base_model.generate(**inputs, max_new_tokens=1024)
|
56 |
decoded_response = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
57 |
return decoded_response
|
58 |
|