pszemraj commited on
Commit
71fd45b
1 Parent(s): f36b34e

🎨 default beams to 4 and

Browse files

Signed-off-by: peter szemraj <peterszemraj@gmail.com>

Files changed (2) hide show
  1. app.py +9 -8
  2. utils.py +6 -2
app.py CHANGED
@@ -202,9 +202,10 @@ if __name__ == "__main__":
202
  label="Generated Text",
203
  placeholder="This is where the generated text will appear",
204
  interactive=False,
205
-
206
  )
207
- email_mailto_button = gr.HTML("<i>a clickable email button will appear here</i>")
 
 
208
 
209
  gr.Markdown("---")
210
  gr.Markdown("## Advanced Options")
@@ -222,15 +223,15 @@ if __name__ == "__main__":
222
  variant="secondary",
223
  )
224
  no_repeat_ngram_size = gr.Radio(
225
- choices=[1, 2, 3, 4],
226
- label="no repeat ngram size",
227
- value=2,
228
- )
229
  with gr.Row():
230
  num_beams = gr.Radio(
231
- choices=[2, 3, 4, 8],
232
  label="Number of Beams",
233
- value=3,
234
  )
235
 
236
  num_beam_groups = gr.Radio(
 
202
  label="Generated Text",
203
  placeholder="This is where the generated text will appear",
204
  interactive=False,
 
205
  )
206
+ email_mailto_button = gr.HTML(
207
+ "<i>a clickable email button will appear here</i>"
208
+ )
209
 
210
  gr.Markdown("---")
211
  gr.Markdown("## Advanced Options")
 
223
  variant="secondary",
224
  )
225
  no_repeat_ngram_size = gr.Radio(
226
+ choices=[1, 2, 3, 4],
227
+ label="no repeat ngram size",
228
+ value=2,
229
+ )
230
  with gr.Row():
231
  num_beams = gr.Radio(
232
+ choices=[2, 4, 8],
233
  label="Number of Beams",
234
+ value=4,
235
  )
236
 
237
  num_beam_groups = gr.Radio(
utils.py CHANGED
@@ -102,7 +102,11 @@ def make_email_link(
102
  return nice_html_button
103
 
104
 
105
- def make_mailto_form(body: str=None, subject: str="This email was generated by Postbot with AI!", cc_email: str="",):
 
 
 
 
106
  """Returns a mailto link with the given parameters"""
107
 
108
  if body is None:
@@ -158,4 +162,4 @@ def make_mailto_form(body: str=None, subject: str="This email was generated by P
158
  </body>
159
  </html>"""
160
 
161
- return template
 
102
  return nice_html_button
103
 
104
 
105
+ def make_mailto_form(
106
+ body: str = None,
107
+ subject: str = "This email was generated by Postbot with AI!",
108
+ cc_email: str = "",
109
+ ):
110
  """Returns a mailto link with the given parameters"""
111
 
112
  if body is None:
 
162
  </body>
163
  </html>"""
164
 
165
+ return template