openFashionClip / test_local.py
im
Example 2 encoder
660ea27
raw
history blame
727 Bytes
from app import generate_embeddings # Import the function from app.py
# Test with a text query only
result_text = generate_embeddings(input_text="red dress")
print("Text Embedding Result:", result_text)
# Test with an image URL only
result_image = generate_embeddings(input_image_url="https://vacier.com/cdn/shop/files/Unisize_Ring_db777381-c510-457f-b8c9-5812665d094b.jpg?v=1731838123&width=1080")
print("Image Embedding Result:", result_image)
# Test with both text and image
result_both = generate_embeddings(input_text="red dress", input_image_url="https://vacier.com/cdn/shop/files/Unisize_Ring_db777381-c510-457f-b8c9-5812665d094b.jpg?v=1731838123&width=1080")
print("Text and Image Embedding Result:", result_both)