Y Phung Nguyen commited on
Commit
5d5697b
·
1 Parent(s): 0c5218c

Fix indent

Browse files
Files changed (1) hide show
  1. ui.py +7 -7
ui.py CHANGED
@@ -494,7 +494,7 @@ def create_demo():
494
  result = check_model_status(model_name)
495
  if result and isinstance(result, tuple) and len(result) == 2:
496
  status_text, is_ready = result
497
- return status_text
498
  else:
499
  return "⚠️ Unable to check model status"
500
  except Exception as e:
@@ -507,12 +507,12 @@ def create_demo():
507
  result = load_model_and_update_status(model_name)
508
  if result and isinstance(result, tuple) and len(result) == 2:
509
  status_text, is_ready = result
510
- submit_enabled = is_ready
511
- return (
512
- status_text,
513
- gr.update(interactive=submit_enabled),
514
- gr.update(interactive=submit_enabled)
515
- )
516
  else:
517
  error_msg = "⚠️ Unable to load model status"
518
  return (
 
494
  result = check_model_status(model_name)
495
  if result and isinstance(result, tuple) and len(result) == 2:
496
  status_text, is_ready = result
497
+ return status_text
498
  else:
499
  return "⚠️ Unable to check model status"
500
  except Exception as e:
 
507
  result = load_model_and_update_status(model_name)
508
  if result and isinstance(result, tuple) and len(result) == 2:
509
  status_text, is_ready = result
510
+ submit_enabled = is_ready
511
+ return (
512
+ status_text,
513
+ gr.update(interactive=submit_enabled),
514
+ gr.update(interactive=submit_enabled)
515
+ )
516
  else:
517
  error_msg = "⚠️ Unable to load model status"
518
  return (