Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,17 +29,12 @@ client_z=[]
|
|
29 |
|
30 |
def load_models(inp):
|
31 |
|
32 |
-
out_box=[gr.Chatbot(),gr.Chatbot(),gr.Chatbot(),gr.Chatbot()]
|
33 |
print(type(inp))
|
34 |
print(inp)
|
35 |
-
print(models[inp
|
36 |
client_z.clear()
|
37 |
-
client_z.append(InferenceClient(models[inp
|
38 |
-
return gr.update(label=models[inp
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
|
44 |
VERBOSE=False
|
45 |
|
@@ -63,7 +58,9 @@ def custom_prompt(prompt):
|
|
63 |
def chat_inf(system_prompt,prompt,history,memory,client_choice,seed,temp,tokens,top_p,rep_p,chat_mem,cust_p):
|
64 |
#token max=8192
|
65 |
hist_len=0
|
66 |
-
client=clients[int(client_choice)-1]
|
|
|
|
|
67 |
if not history:
|
68 |
history = []
|
69 |
hist_len=0
|
|
|
29 |
|
30 |
def load_models(inp):
|
31 |
|
|
|
32 |
print(type(inp))
|
33 |
print(inp)
|
34 |
+
print(models[inp])
|
35 |
client_z.clear()
|
36 |
+
client_z.append(InferenceClient(models[inp]))
|
37 |
+
return gr.update(label=models[inp])
|
|
|
|
|
|
|
|
|
38 |
|
39 |
VERBOSE=False
|
40 |
|
|
|
58 |
def chat_inf(system_prompt,prompt,history,memory,client_choice,seed,temp,tokens,top_p,rep_p,chat_mem,cust_p):
|
59 |
#token max=8192
|
60 |
hist_len=0
|
61 |
+
#client=clients[int(client_choice)-1]
|
62 |
+
client=client_z[0]
|
63 |
+
|
64 |
if not history:
|
65 |
history = []
|
66 |
hist_len=0
|