vpcom commited on
Commit
efa8767
·
1 Parent(s): a20d9e6

fix: use the correct label for who are you

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -626,6 +626,11 @@ def generate(
626
  return output
627
 
628
  additional_inputs=[
 
 
 
 
 
629
  gr.Textbox("<|endoftext|>", label="Optional system prompt"), #<|endoftext|>
630
  gr.Slider(
631
  label="Temperature",
@@ -672,11 +677,6 @@ additional_inputs=[
672
  interactive=True,
673
  info="Penalize repeated tokens",
674
  ),
675
- gr.Textbox(
676
- "",
677
- label="textbox_whoareu",
678
- placeholder="...Please write your name here",
679
- ),
680
  gr.Markdown(
681
  """
682
 
@@ -1065,14 +1065,14 @@ def vote(data: gr.LikeData):
1065
  {
1066
  "time_stamp": time.time(),
1067
  "model_version":MODEL_VERSION,
1068
- "username":additional_inputs[-2].value,
1069
  "prompt": PROMPT.replace('\n','؛').replace('\t','/').replace(' * ','/').replace('\u200c',' ').strip(),
1070
- "system prompt": additional_inputs[0].value,
1071
- "temperature": additional_inputs[1].value,
1072
- "max_new_tokens": additional_inputs[2].value,
1073
- "top_p": additional_inputs[3].value,
1074
- "top_k": additional_inputs[4].value,
1075
- "repetition_penalty": additional_inputs[5].value,
1076
  "response": data.value.replace('\n','؛').replace('\t','/').replace(' * ','/').replace('\u200c',' ').strip(),
1077
  "label": data.liked,
1078
  }, ensure_ascii=False
 
626
  return output
627
 
628
  additional_inputs=[
629
+ gr.Textbox(
630
+ "",
631
+ label="Who are you?",
632
+ placeholder="...Please write your name here",
633
+ ),
634
  gr.Textbox("<|endoftext|>", label="Optional system prompt"), #<|endoftext|>
635
  gr.Slider(
636
  label="Temperature",
 
677
  interactive=True,
678
  info="Penalize repeated tokens",
679
  ),
 
 
 
 
 
680
  gr.Markdown(
681
  """
682
 
 
1065
  {
1066
  "time_stamp": time.time(),
1067
  "model_version":MODEL_VERSION,
1068
+ "username":additional_inputs[0].value,
1069
  "prompt": PROMPT.replace('\n','؛').replace('\t','/').replace(' * ','/').replace('\u200c',' ').strip(),
1070
+ "system prompt": additional_inputs[1].value,
1071
+ "temperature": additional_inputs[2].value,
1072
+ "max_new_tokens": additional_inputs[3].value,
1073
+ "top_p": additional_inputs[4].value,
1074
+ "top_k": additional_inputs[5].value,
1075
+ "repetition_penalty": additional_inputs[6].value,
1076
  "response": data.value.replace('\n','؛').replace('\t','/').replace(' * ','/').replace('\u200c',' ').strip(),
1077
  "label": data.liked,
1078
  }, ensure_ascii=False