Update app.py
Browse files
app.py
CHANGED
@@ -107,6 +107,7 @@ def compress_history(formatted_prompt):
|
|
107 |
|
108 |
def comment_generate(prompt, history,post_check,full_conv, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=1028, top_p=0.95, repetition_penalty=1.3,):
|
109 |
#def question_generate(prompt, history):
|
|
|
110 |
print(post_check)
|
111 |
#full_conv=history
|
112 |
print(f'full_conv::\n{full_conv}')
|
@@ -152,7 +153,9 @@ def comment_generate(prompt, history,post_check,full_conv, agent_name=agents[0],
|
|
152 |
html_out=load_html(full_conv,None)
|
153 |
|
154 |
#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':[]}
|
155 |
-
|
|
|
|
|
156 |
print(f'status code main:: {r.status_code}')
|
157 |
if r.status_code==200:
|
158 |
try:
|
|
|
107 |
|
108 |
def comment_generate(prompt, history,post_check,full_conv, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=1028, top_p=0.95, repetition_penalty=1.3,):
|
109 |
#def question_generate(prompt, history):
|
110 |
+
uid=uuid.uuid4()
|
111 |
print(post_check)
|
112 |
#full_conv=history
|
113 |
print(f'full_conv::\n{full_conv}')
|
|
|
153 |
html_out=load_html(full_conv,None)
|
154 |
|
155 |
#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':[]}
|
156 |
+
file_n = f'{post_check['filename'].json}'
|
157 |
+
|
158 |
+
r = requests.get(f'{save_data}{file_n}')
|
159 |
print(f'status code main:: {r.status_code}')
|
160 |
if r.status_code==200:
|
161 |
try:
|