Yntec commited on
Commit
01de3f3
1 Parent(s): 37d194f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from random import randint
3
  from all_models import models
4
 
5
-
6
 
7
  def load_fn(models):
8
  global models_load
@@ -11,7 +11,7 @@ def load_fn(models):
11
  for model in models:
12
  if model not in models_load.keys():
13
  try:
14
- m = gr.load(f'models/{model}')
15
  except Exception as error:
16
  m = gr.Interface(lambda txt: None, ['text'], ['image'])
17
  models_load.update({model: m})
@@ -119,5 +119,5 @@ with gr.Blocks() as demo:
119
  """
120
  )
121
 
122
- demo.queue(concurrency_count = 200)
123
  demo.launch()
 
2
  from random import randint
3
  from all_models import models
4
 
5
+ from externalmod import gr_Interface_load
6
 
7
  def load_fn(models):
8
  global models_load
 
11
  for model in models:
12
  if model not in models_load.keys():
13
  try:
14
+ m = gr_Interface_load(f'models/{model}')
15
  except Exception as error:
16
  m = gr.Interface(lambda txt: None, ['text'], ['image'])
17
  models_load.update({model: m})
 
119
  """
120
  )
121
 
122
+ demo.queue()
123
  demo.launch()