Skip to content

Instantly share code, notes, and snippets.

def analyze_image(image_file, custom_prompt=None):
"""Analyze an image using the API"""
if not image_file:
return False, "No image file provided"
try:
# Make sure Flask server is running
if not is_flask_server_running():
start_flask_server()
# Give it a moment to start up