akhaliq HF staff commited on
Commit
fe69f1a
·
1 Parent(s): 7f0560a
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -30,8 +30,8 @@ def get_app(
30
  if isinstance(block, gr.Blocks):
31
  block.render()
32
  else:
33
- # Handle the case where block is a function
34
- block().render()
35
  else:
36
  gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
37
  columns.append(column)
 
30
  if isinstance(block, gr.Blocks):
31
  block.render()
32
  else:
33
+ # Handle the case where block is a function by passing the model name
34
+ block(name=model_name).render()
35
  else:
36
  gr.load(name=model_name, src=src, accept_token=accept_token, **kwargs)
37
  columns.append(column)