File size: 532 Bytes
19dc712 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from model_initial import initialize_models
from generate_caption import generate_caption
from PIL import Image
if __name__ == "__main__" or "get_ipython" in globals():
print("Initializing models...")
try:
clip_model, image_adapter = initialize_models()
print("Models initialized successfully!")
except Exception as e:
print(f"Error initializing models: {e}")
print("You can still use the basic caption functionality with Gemini API only")
clip_model, image_adapter = None, None
|