When is this applicable?
This article explains how to use either a URL or a locally stored image as a Flow tile image.
For some Flow tile images, a stock URL image may not suffice, or you may want to use a specific image saved locally. The Virtualitics AI Platform has internal support for users to use custom tile images obtained from a URL or locally saved images.
How-To
Use a URL to create Flow tile image:
from predict_backend.flow.flow import Flow
EXAMPLE_URL = "https://blogs.3ds.com/biovia/wp-content/uploads/sites/27/2020/07/shutterstock_1141709903-scaled.jpg"
flow_img_url = EXAMPLE_URL
flow_object = Flow("Title","Description",flow_img_url)
Use a local image to create Flow tile image:
from predict_backend.flow.flow import Flow
from projects.image_helpers import get_img_base64
# Store your images in a folder.
# In this example we store the image in the 'project_images' folder.
flow_img = get_img_base64("project_images/image_name.jpeg")
flow_object = Flow("Title","Description",flow_img)
What to Expect (Validation)
The image will be displayed as your Flow tile image as shown below.
