Spaces:
Running
Running
returned json format
Browse files
app.py
CHANGED
|
@@ -191,7 +191,7 @@ def process_image_and_prompt(composite_pil, prompt):
|
|
| 191 |
model = "gemini-2.0-flash-exp" # Specify the model here
|
| 192 |
|
| 193 |
# 2. Call get_image_tags to get tags from the original image
|
| 194 |
-
tagging_prompt = "Analyze this image. Provide a JSON object containing a single key, 'tags', whose value is a JSON array of strings, representing relevant keywords or tags for the image content. Example: {"tags": ["apple", "fruit", "red"]}. Provide ONLY the JSON object and nothing else."
|
| 195 |
tag_json_string = get_image_tags(file_name, tagging_prompt, model=model)
|
| 196 |
|
| 197 |
# 3. Call generate for the main image processing based on the user prompt
|
|
|
|
| 191 |
model = "gemini-2.0-flash-exp" # Specify the model here
|
| 192 |
|
| 193 |
# 2. Call get_image_tags to get tags from the original image
|
| 194 |
+
tagging_prompt = "Analyze this image. Provide a JSON object containing a single key, 'tags', whose value is a JSON array of strings, representing relevant keywords or tags for the image content. Example: {\"tags\": [\"apple\", \"fruit\", \"red\"]}. Provide ONLY the JSON object and nothing else."
|
| 195 |
tag_json_string = get_image_tags(file_name, tagging_prompt, model=model)
|
| 196 |
|
| 197 |
# 3. Call generate for the main image processing based on the user prompt
|