Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -124,6 +124,7 @@ def generate(prompt, history, agent_name=agents[0], sys_prompt="", temperature=0
|
|
124 |
temperature = 1e-2
|
125 |
top_p = float(top_p)
|
126 |
hist_out=[]
|
|
|
127 |
filename=create_valid_filename(f'{prompt}---{current_time}')
|
128 |
while True:
|
129 |
seed = random.randint(1,1111111111111111)
|
@@ -181,8 +182,9 @@ def generate(prompt, history, agent_name=agents[0], sys_prompt="", temperature=0
|
|
181 |
output = compress_history(formatted_prompt)
|
182 |
summary[0]=output
|
183 |
sum_json = {"summary":summary[0]}
|
|
|
184 |
with open(f'{uid}-sum.json', 'w') as f:
|
185 |
-
json_obj=json.dumps(
|
186 |
f.write(json_obj)
|
187 |
f.close()
|
188 |
upload_file(
|
|
|
124 |
temperature = 1e-2
|
125 |
top_p = float(top_p)
|
126 |
hist_out=[]
|
127 |
+
sum_out=[]
|
128 |
filename=create_valid_filename(f'{prompt}---{current_time}')
|
129 |
while True:
|
130 |
seed = random.randint(1,1111111111111111)
|
|
|
182 |
output = compress_history(formatted_prompt)
|
183 |
summary[0]=output
|
184 |
sum_json = {"summary":summary[0]}
|
185 |
+
sum_out.append(sum_json)
|
186 |
with open(f'{uid}-sum.json', 'w') as f:
|
187 |
+
json_obj=json.dumps(sum_out, indent=4)
|
188 |
f.write(json_obj)
|
189 |
f.close()
|
190 |
upload_file(
|