FredZhang7 commited on
Commit
4f01b22
1 Parent(s): 1c927ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -45,8 +45,8 @@ def evaluate(
45
  token_count=200,
46
  temperature=1.0,
47
  top_p=0.5,
48
- presencePenalty = 0.4,
49
- countPenalty = 0.4,
50
  ):
51
  args = PIPELINE_ARGS(temperature = max(0.2, float(temperature)), top_p = float(top_p),
52
  alpha_frequency = countPenalty,
@@ -118,8 +118,8 @@ with gr.Blocks(title=title) as demo:
118
  token_count = gr.Slider(10, 300, label="Max Tokens", step=10, value=300)
119
  temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.2)
120
  top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.5)
121
- presence_penalty = gr.Slider(0.0, 1.0, label="Presence Penalty", step=0.1, value=0.4)
122
- count_penalty = gr.Slider(0.0, 1.0, label="Count Penalty", step=0.1, value=0.4)
123
  with gr.Column():
124
  with gr.Row():
125
  submit = gr.Button("Submit", variant="primary")
 
45
  token_count=200,
46
  temperature=1.0,
47
  top_p=0.5,
48
+ presencePenalty = 0.5,
49
+ countPenalty = 0.5,
50
  ):
51
  args = PIPELINE_ARGS(temperature = max(0.2, float(temperature)), top_p = float(top_p),
52
  alpha_frequency = countPenalty,
 
118
  token_count = gr.Slider(10, 300, label="Max Tokens", step=10, value=300)
119
  temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.2)
120
  top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.5)
121
+ presence_penalty = gr.Slider(0.0, 1.0, label="Presence Penalty", step=0.1, value=0.5)
122
+ count_penalty = gr.Slider(0.0, 1.0, label="Count Penalty", step=0.1, value=0.5)
123
  with gr.Column():
124
  with gr.Row():
125
  submit = gr.Button("Submit", variant="primary")