Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ sentence_model = SentenceTransformer("all-MiniLM-L6-v2")
|
|
12 |
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
|
13 |
image_model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
|
14 |
|
15 |
-
def generate_input(image=None, text=None
|
16 |
# If an image is provided
|
17 |
if image:
|
18 |
inputs = processor(images=image, return_tensors="pt")
|
|
|
12 |
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
|
13 |
image_model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
|
14 |
|
15 |
+
def generate_input(model, image=None, text=None):
|
16 |
# If an image is provided
|
17 |
if image:
|
18 |
inputs = processor(images=image, return_tensors="pt")
|