apehex commited on
Commit
8513e01
·
1 Parent(s): cfe9e70

Fix syntax bug.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ def fetch_model() -> object:
42
  _MODEL = psaiops.common.model.get_model(name=_app.MODELS[0], device='cuda', **_MODEL_CFG)
43
  # give some feedback
44
  if hasattr(_MODEL, 'name_or_path'):
45
- gradio.Info(title='Info', message=f'Successfully switched to `{getattr(_MODEL, 'name_or_path', 'None')}`.', duration=2)
46
  else:
47
  gradio.Warning(title='Warning', message='The GPU time slot expired before the model could be loaded.', duration=4)
48
  # model object or `None`
 
42
  _MODEL = psaiops.common.model.get_model(name=_app.MODELS[0], device='cuda', **_MODEL_CFG)
43
  # give some feedback
44
  if hasattr(_MODEL, 'name_or_path'):
45
+ gradio.Info(title='Info', message='Successfully switched to `{}`.'.format(getattr(_MODEL, 'name_or_path', 'None')), duration=2)
46
  else:
47
  gradio.Warning(title='Warning', message='The GPU time slot expired before the model could be loaded.', duration=4)
48
  # model object or `None`