Omnibus commited on
Commit
68d9ea2
·
verified ·
1 Parent(s): c287b8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,18 +12,18 @@ def load_models():
12
  try:
13
  loaded_model.append(gr.load(f'models/{model}'))
14
  this = api.list_models(search=model,limit=100,cardData=True)
15
- model_details.append(this)
16
  except Exception as e:
17
  loaded_model.append({"ERROR":e})
18
  try:
19
  this = api.list_models(search=model,limit=100,cardData=True)
20
- model_details.append(this)
21
  except Exception as ee:
22
  model_details.append({"ERROR":ee})
23
  return loaded_model, model_details
24
  with gr.Blocks() as app:
25
  with gr.Row():
26
- models_out=gr.JSON()
27
- details=gr.JSON()
28
  app.load(load_models,None,[models_out,details])
29
  app.launch()
 
12
  try:
13
  loaded_model.append(gr.load(f'models/{model}'))
14
  this = api.list_models(search=model,limit=100,cardData=True)
15
+ model_details.append(this[0])
16
  except Exception as e:
17
  loaded_model.append({"ERROR":e})
18
  try:
19
  this = api.list_models(search=model,limit=100,cardData=True)
20
+ model_details.append(this[0])
21
  except Exception as ee:
22
  model_details.append({"ERROR":ee})
23
  return loaded_model, model_details
24
  with gr.Blocks() as app:
25
  with gr.Row():
26
+ models_out=gr.JSON(label="Gradio Load")
27
+ details=gr.JSON(label="API Details")
28
  app.load(load_models,None,[models_out,details])
29
  app.launch()