Spaces:
Sleeping
Sleeping
0.58 write to sheet
Browse files
app.py
CHANGED
@@ -239,12 +239,19 @@ def generate_both(system_prompt, input_text,
|
|
239 |
finished_b = True
|
240 |
except Exception as e:
|
241 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
242 |
-
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
243 |
-
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
244 |
|
245 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
-
logging.debug(f'{SPACER}\nOutput row: {sheet_row}') #list["in","out"]
|
248 |
return chatbot_a, chatbot_b
|
249 |
|
250 |
def clear():
|
|
|
239 |
finished_b = True
|
240 |
except Exception as e:
|
241 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
|
|
|
|
242 |
|
243 |
+
try:
|
244 |
+
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
245 |
+
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
246 |
+
|
247 |
+
sheet_row = [system_prompt, input_text, max_new_tokens, temperature, repetition_penalty, chatbot_a_name, chatbot_a[0][1], chatbot_b_name, chatbot_b[0][1]]
|
248 |
+
logging.debug(f'{SPACER}\nOutput row: {sheet_row}')
|
249 |
+
sheet = get_google_sheet()
|
250 |
+
sheet.append_row([choice])
|
251 |
+
|
252 |
+
except Exception as e:
|
253 |
+
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
254 |
|
|
|
255 |
return chatbot_a, chatbot_b
|
256 |
|
257 |
def clear():
|