This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |