Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -172,6 +172,8 @@ def chat_inf_b(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p
|
|
172 |
|
173 |
def chat_inf_c(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p,rep_p,hid_val):
|
174 |
if len(client_choice)>=hid_val:
|
|
|
|
|
175 |
client=client_z[int(hid_val)-1]
|
176 |
if not history:
|
177 |
history = []
|
@@ -198,6 +200,8 @@ def chat_inf_c(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p
|
|
198 |
|
199 |
def chat_inf_d(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p,rep_p,hid_val):
|
200 |
if len(client_choice)>=hid_val:
|
|
|
|
|
201 |
client=client_z[int(hid_val)-1]
|
202 |
if not history:
|
203 |
history = []
|
@@ -222,7 +226,7 @@ def chat_inf_d(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p
|
|
222 |
else:
|
223 |
yield None
|
224 |
def clear_fn():
|
225 |
-
return None,None,None
|
226 |
rand_val=random.randint(1,1111111111111111)
|
227 |
def check_rand(inp,val):
|
228 |
if inp==True:
|
|
|
172 |
|
173 |
def chat_inf_c(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p,rep_p,hid_val):
|
174 |
if len(client_choice)>=hid_val:
|
175 |
+
if system_prompt:
|
176 |
+
system_prompt=f'{system_prompt}, '
|
177 |
client=client_z[int(hid_val)-1]
|
178 |
if not history:
|
179 |
history = []
|
|
|
200 |
|
201 |
def chat_inf_d(system_prompt,prompt,history,client_choice,seed,temp,tokens,top_p,rep_p,hid_val):
|
202 |
if len(client_choice)>=hid_val:
|
203 |
+
if system_prompt:
|
204 |
+
system_prompt=f'{system_prompt}, '
|
205 |
client=client_z[int(hid_val)-1]
|
206 |
if not history:
|
207 |
history = []
|
|
|
226 |
else:
|
227 |
yield None
|
228 |
def clear_fn():
|
229 |
+
return None,None,None,None,None,None
|
230 |
rand_val=random.randint(1,1111111111111111)
|
231 |
def check_rand(inp,val):
|
232 |
if inp==True:
|