Spaces:
Sleeping
Sleeping
File size: 309 Bytes
adcc0ff | 1 2 3 4 5 6 7 8 9 | def get_image_path(uploaded_image, sample_image_name):
"""Determine the image path to use"""
if uploaded_image:
return uploaded_image
elif sample_image_name:
return sample_images.get(sample_image_name)
else:
raise ValueError("No image selected. Please upload an image or select a sample")
|