Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def bot(
|
|
47 |
model_name = 'gemini-pro-vision' if image_prompt else 'gemini-1.5-pro-latest'
|
48 |
|
49 |
if image_prompt:
|
50 |
-
images_with_prompt = [text_prompt,
|
51 |
model = genai.GenerativeModel(model_name)
|
52 |
response = model.generate_content(images_with_prompt, stream=True)
|
53 |
else:
|
|
|
47 |
model_name = 'gemini-pro-vision' if image_prompt else 'gemini-1.5-pro-latest'
|
48 |
|
49 |
if image_prompt:
|
50 |
+
images_with_prompt = [text_prompt, preprocess_image(image_prompt)]
|
51 |
model = genai.GenerativeModel(model_name)
|
52 |
response = model.generate_content(images_with_prompt, stream=True)
|
53 |
else:
|