Omnibus commited on
Commit
c47b3e3
1 Parent(s): 838b0a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -27,19 +27,16 @@ client_z=[]
27
 
28
 
29
  def load_models(inp):
 
 
30
  print(type(inp))
31
  print(inp)
32
  print(models[inp[0]])
33
  client_z.clear()
34
- if inp[0]:
35
- client_z.append(InferenceClient(models[inp[0]]))
36
- if inp[1]:
37
- client_z.append(InferenceClient(models[inp[1]]))
38
- if inp[2]:
39
- client_z.append(InferenceClient(models[inp[2]]))
40
- if inp[3]:
41
- client_z.append(InferenceClient(models[inp[3]]))
42
- return gr.update(label=models[inp[0]])
43
 
44
 
45
  def format_prompt(message, history):
 
27
 
28
 
29
  def load_models(inp):
30
+
31
+ out_box=[]
32
  print(type(inp))
33
  print(inp)
34
  print(models[inp[0]])
35
  client_z.clear()
36
+ for z,ea in inp:
37
+ client_z.append(InferenceClient(models[inp[z]]))
38
+ out_box.append(gr.update(label=models[inp[z]]))
39
+ return out_box[0]
 
 
 
 
 
40
 
41
 
42
  def format_prompt(message, history):