NeuralActivationOptimizer / utils /get_image_path.py
aayushrk
Add Neural Activation Optimizer app
adcc0ff
Raw
History Blame Contribute Delete
309 Bytes
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")