Spaces:
Running
Running
broadfield
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -227,13 +227,13 @@ def agent(prompt_in,history,mod=2):
|
|
227 |
outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
|
228 |
in_data[4]=outph
|
229 |
print(outph)
|
230 |
-
history
|
231 |
yield history
|
232 |
role="MANAGER"
|
233 |
outp=generate(prompt,history,mod,128,seed,role,in_data)
|
234 |
outp0=list(outp)[0].split('<|im_end|>')[0]
|
235 |
#outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
|
236 |
-
history
|
237 |
yield history
|
238 |
for line in outp0.split("\n"):
|
239 |
if "action:" in line:
|
|
|
227 |
outph= list(generate(prompt,history,mod,2400,seed,role,in_data))[0]
|
228 |
in_data[4]=outph
|
229 |
print(outph)
|
230 |
+
history+[{'role':'assistant','content':str(outph)}]
|
231 |
yield history
|
232 |
role="MANAGER"
|
233 |
outp=generate(prompt,history,mod,128,seed,role,in_data)
|
234 |
outp0=list(outp)[0].split('<|im_end|>')[0]
|
235 |
#outp0 = re.sub('[^a-zA-Z0-9\s.,?!%()]', '', outpp)
|
236 |
+
history+[{'role':'assistant','content':str(outp0)}]
|
237 |
yield history
|
238 |
for line in outp0.split("\n"):
|
239 |
if "action:" in line:
|