Update app.py
Browse files
app.py
CHANGED
@@ -167,7 +167,7 @@ def comment_generate(prompt, history,post_check,full_conv,persona2, agent_name=a
|
|
167 |
#out_json = {'user':"",'datetime':current_time,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output}
|
168 |
#full_conv[-1]+=(output,)
|
169 |
full_conv.append((None,output,None))
|
170 |
-
html_out=load_html(full_conv,post_check['title'])
|
171 |
|
172 |
#out_json = {'user':list_of_users[0],'datetime':current_time,'file_name':filename,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output,'comment_list':[]}
|
173 |
file_n = f'{post_check["filename"]}.json'
|
@@ -242,7 +242,7 @@ def reply_generate(prompt, history,post_check,full_conv,persona1, agent_name=age
|
|
242 |
#out_json = {'user':"",'datetime':current_time,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output}
|
243 |
#full_conv[-1]+=(output,)
|
244 |
full_conv.append((None,None,output))
|
245 |
-
html_out=load_html(full_conv,post_check['title'])
|
246 |
|
247 |
file_n = f'{post_check["filename"]}.json'
|
248 |
print(file_n)
|
@@ -452,7 +452,7 @@ def generate(prompt, history, post_check,full_conv,persona1, agent_name=agents[0
|
|
452 |
print(f'title:: {title}')
|
453 |
filename=create_valid_filename(f'{current_time}---{title}')
|
454 |
|
455 |
-
out_json = {'user':
|
456 |
|
457 |
hist_out.append(out_json)
|
458 |
#try:
|
|
|
167 |
#out_json = {'user':"",'datetime':current_time,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output}
|
168 |
#full_conv[-1]+=(output,)
|
169 |
full_conv.append((None,output,None))
|
170 |
+
html_out=load_html(full_conv,post_check['title'],post_check['user'])
|
171 |
|
172 |
#out_json = {'user':list_of_users[0],'datetime':current_time,'file_name':filename,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output,'comment_list':[]}
|
173 |
file_n = f'{post_check["filename"]}.json'
|
|
|
242 |
#out_json = {'user':"",'datetime':current_time,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output}
|
243 |
#full_conv[-1]+=(output,)
|
244 |
full_conv.append((None,None,output))
|
245 |
+
html_out=load_html(full_conv,post_check['title'],post_check['user'])
|
246 |
|
247 |
file_n = f'{post_check["filename"]}.json'
|
248 |
print(file_n)
|
|
|
452 |
print(f'title:: {title}')
|
453 |
filename=create_valid_filename(f'{current_time}---{title}')
|
454 |
|
455 |
+
out_json = {'user':persona[persona1]['name'],'datetime':current_time,'file_name':filename,'title':title,'blog':1,'comment':0,'reply':0,"prompt":prompt,"output":output,'comment_list':[]}
|
456 |
|
457 |
hist_out.append(out_json)
|
458 |
#try:
|