Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -104,6 +104,7 @@ def generate_and_upload_image(prompt: str) -> str:
|
|
| 104 |
try:
|
| 105 |
response = genai_client.models.generate_content(
|
| 106 |
model="gemini-2.0-flash-preview-image-generation",
|
|
|
|
| 107 |
contents=prompt,
|
| 108 |
config=types.GenerateContentConfig(response_modalities=['Text', 'Image'])
|
| 109 |
)
|
|
@@ -145,7 +146,8 @@ def analyze_image_with_text(image_path: str, user_text: str) -> str:
|
|
| 145 |
|
| 146 |
img_user = PIL.Image.open(image_path)
|
| 147 |
response = genai_client.models.generate_content(
|
| 148 |
-
model="gemini-2.5-flash
|
|
|
|
| 149 |
contents=[img_user, user_text]
|
| 150 |
)
|
| 151 |
if (response.text != None):
|
|
|
|
| 104 |
try:
|
| 105 |
response = genai_client.models.generate_content(
|
| 106 |
model="gemini-2.0-flash-preview-image-generation",
|
| 107 |
+
temperature=0.5,
|
| 108 |
contents=prompt,
|
| 109 |
config=types.GenerateContentConfig(response_modalities=['Text', 'Image'])
|
| 110 |
)
|
|
|
|
| 146 |
|
| 147 |
img_user = PIL.Image.open(image_path)
|
| 148 |
response = genai_client.models.generate_content(
|
| 149 |
+
model="gemini-2.5-flash",
|
| 150 |
+
temperature=0.3,
|
| 151 |
contents=[img_user, user_text]
|
| 152 |
)
|
| 153 |
if (response.text != None):
|