Spaces:
No application file

collab / src /common /util.py
agurod42's picture
Synced repo using 'sync_with_huggingface' Github Action
c4c8ae2 verified
Raw History Blame Contribute Delete
219 Bytes
# Function to get the first key different than 'Undefined'
def get_first_valid_key(dictionary, invalid_key = 'Undefined'):
for key in dictionary:
if key != invalid_key:
return key
return None