Chris Addis commited on
Commit ·
77c5492
1
Parent(s): 6e284a0
add photograph
Browse files
app.py
CHANGED
|
@@ -43,10 +43,10 @@ def get_sys_prompt(length="medium", photograph=False):
|
|
| 43 |
else:
|
| 44 |
object_type = "museum objects"
|
| 45 |
|
| 46 |
-
dev_prompt = """You are a museum curator tasked with generating
|
| 47 |
|
| 48 |
if length == "short":
|
| 49 |
-
dev_prompt
|
| 50 |
elif length == "medium":
|
| 51 |
dev_prompt += " Repsonses should be a maximum of 250-300 characters."
|
| 52 |
else: # long
|
|
@@ -134,8 +134,7 @@ def create_demo():
|
|
| 134 |
("GPT-4.1", "gpt-4.1"), ("ChatGPT Latest", "openai/chatgpt-4o-latest"),
|
| 135 |
("Claude 3.7 Sonnet", "anthropic/claude-3.7-sonnet"),
|
| 136 |
("Llama 4 Maverick", "meta-llama/llama-4-maverick"),
|
| 137 |
-
("Gemini 2.5 Pro", "gemini-2.5-pro-
|
| 138 |
-
("Gemini 2.0 Flash Thinking", "gemini-2.0-flash-thinking-exp-01-21"),
|
| 139 |
("Gemini 2.5 Flash Thinking", "google/gemini-2.5-flash-preview:thinking")
|
| 140 |
]
|
| 141 |
default_model_internal_value = "google/gemini-2.0-flash-001"
|
|
|
|
| 43 |
else:
|
| 44 |
object_type = "museum objects"
|
| 45 |
|
| 46 |
+
dev_prompt = f"""You are a museum curator tasked with generating long descriptions (as defined by W3C) of {object_type} for visually impaired and blind users from images. Use British English and follow museum accessibility best practices. Do not start with phrases like 'The image shows', 'This is an image of', 'The photograph'. Be precise, concise and avoid filler and subjective statements."""
|
| 47 |
|
| 48 |
if length == "short":
|
| 49 |
+
dev_prompt = f"""You are a museum curator tasked with generating alt-text (as defined by W3C) of {object_type} for visually impaired and blind users from images. Use British English and follow museum accessibility best practices. Do not start with phrases like 'The image shows' or 'This is an image of'. Be precise, concise and avoid filler and subjective statements. Repsonses should be a maximum of 130 characters."""
|
| 50 |
elif length == "medium":
|
| 51 |
dev_prompt += " Repsonses should be a maximum of 250-300 characters."
|
| 52 |
else: # long
|
|
|
|
| 134 |
("GPT-4.1", "gpt-4.1"), ("ChatGPT Latest", "openai/chatgpt-4o-latest"),
|
| 135 |
("Claude 3.7 Sonnet", "anthropic/claude-3.7-sonnet"),
|
| 136 |
("Llama 4 Maverick", "meta-llama/llama-4-maverick"),
|
| 137 |
+
("Gemini 2.5 Pro", "google/gemini-2.5-pro-preview-03-25"),
|
|
|
|
| 138 |
("Gemini 2.5 Flash Thinking", "google/gemini-2.5-flash-preview:thinking")
|
| 139 |
]
|
| 140 |
default_model_internal_value = "google/gemini-2.0-flash-001"
|