Spaces:
Sleeping
Sleeping
0.61 fixing append_row
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ system_prompts = {
|
|
30 |
"Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
|
31 |
}
|
32 |
|
33 |
-
htmL_info = "<center><h1>⚔️ Pharia Bot Battle</h1><p><big>Let the games begin: In this arena, the Pharia 1 model competes against a random challenger.</p><ul><li>Try a prompt in a language you want to explore</li><li>Set the parameters and vote for the best answers</li><li>After casting your vote, both bots reveal their identity</li><p>
|
34 |
|
35 |
model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
|
36 |
"name": "Pharia 1 LLM 7B control hf"}]
|
@@ -248,10 +248,10 @@ def generate_both(system_prompt, input_text,
|
|
248 |
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
249 |
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
250 |
|
251 |
-
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]]
|
252 |
logging.debug(f'{SPACER}\nOutput row: {sheet_row}')
|
253 |
sheet = get_google_sheet()
|
254 |
-
sheet.append_row(sheet_row, table_range="A1:
|
255 |
|
256 |
except Exception as e:
|
257 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|
|
|
30 |
"Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
|
31 |
}
|
32 |
|
33 |
+
htmL_info = "<center><h1>⚔️ Pharia Bot Battle</h1><p><big>Let the games begin: In this arena, the Pharia 1 model competes against a random challenger.</p><ul><li>Try a prompt in a language you want to explore</li><li>Set the parameters and vote for the best answers</li><li>After casting your vote, both bots reveal their identity</li><p>Please note that inputs, outputs and votes are logged anonymously. Feel free to use the bot if you’re cool with that!</p></big></center>"
|
34 |
|
35 |
model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
|
36 |
"name": "Pharia 1 LLM 7B control hf"}]
|
|
|
248 |
#system_prompt user_prompt max_new_tokens temperature top_p penalty bot_a_name bot_a_output bot_b_name bot_b_output
|
249 |
#system_prompt, input_text, chatbot_a, chatbot_b, max_new_tokens=2048, temperature=0.2, top_p=0.9, repetition_penalty=1.1
|
250 |
|
251 |
+
sheet_row = [system_prompt, input_text, max_new_tokens, temperature, top_p, repetition_penalty, chatbot_a_name, chatbot_a[0][1], chatbot_b_name, chatbot_b[0][1], "None", "None"]
|
252 |
logging.debug(f'{SPACER}\nOutput row: {sheet_row}')
|
253 |
sheet = get_google_sheet()
|
254 |
+
sheet.append_row(sheet_row, table_range="A1:L1")
|
255 |
|
256 |
except Exception as e:
|
257 |
logging.error(f'{SPACER} Error: {e}, Traceback {traceback.format_exc()}')
|