5to9 commited on
Commit
404a70a
1 Parent(s): 8dd9c7e

0.56 Spreadsheet row test

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -28,7 +28,7 @@ system_prompts = {
28
  "Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
29
  }
30
 
31
- htmL_info = "<center><h1>⚔️ Pharia Bot Battle Royale</h1><p>Let the games begin: In this arena, the Pharia 1 model competes against a random challenger. Try a prompt in a language you want to explore. Set the parameters and vote for the best answers. After casting your vote, both bots reveal their identity. Inputs, outputs and votes are logged anonymously.</p></center>"
32
 
33
  model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
34
  "name": "Pharia 1 LLM 7B control hf"}]
@@ -239,8 +239,12 @@ 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
 
243
- logging.debug(f'Output complete chatbot_a: {chatbot_a} chatbot_b: {chatbot_b}')
 
 
244
  return chatbot_a, chatbot_b
245
 
246
  def clear():
 
28
  "Spanish": "Eres un chatbot servicial que responde a las entradas de los usuarios de forma concisa y original."
29
  }
30
 
31
+ 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.</big></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>Inputs, outputs and votes are logged anonymously.</p></center>"
32
 
33
  model_info = [{"id": "Aleph-Alpha/Pharia-1-LLM-7B-control-hf",
34
  "name": "Pharia 1 LLM 7B control hf"}]
 
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
+ sheet_row = [system_prompt, input_text, max_new_tokens, temperature, repetition_penalty, chatbot_a_name, chatbot_a[1], chatbot_b_name, chatbot_b[1]]
246
+
247
+ logging.debug(f'{SPACER}\nOutput row: {sheet_row}') #list["in","out"]
248
  return chatbot_a, chatbot_b
249
 
250
  def clear():