sayakpaul HF staff commited on
Commit
aa30618
·
1 Parent(s): 044ad88

better printing of error

Browse files
Files changed (2) hide show
  1. __pycache__/app.cpython-39.pyc +0 -0
  2. app.py +2 -1
__pycache__/app.cpython-39.pyc ADDED
Binary file (5.08 kB). View file
 
app.py CHANGED
@@ -73,7 +73,8 @@ def get_component_wise_memory(pipeline_id, token=None, variant=None, revision=No
73
  variant_present_with_extension = any(condition(filename) for filename in current_component_filenames)
74
  if not variant_present_with_extension:
75
  raise ValueError(
76
- f"Requested extension ({extension}) and variant ({variant}) not present for {current_component}. Available files for this component:\n{current_component_filenames}."
 
77
  )
78
  else:
79
  raise ValueError(f"Problem with {current_component}.")
 
73
  variant_present_with_extension = any(condition(filename) for filename in current_component_filenames)
74
  if not variant_present_with_extension:
75
  raise ValueError(
76
+ f"Requested extension ({extension}) and variant ({variant}) not present for {current_component}."
77
+ f" Available files for this component:\n{'\n'.join(current_component_filenames)}."
78
  )
79
  else:
80
  raise ValueError(f"Problem with {current_component}.")