janbanot commited on
Commit
3e975db
·
1 Parent(s): 7b9468a

fix:generate

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -245,8 +245,8 @@ with gr.Blocks(
245
  )
246
 
247
  # Event handlers for button actions to process and clear text
248
- def format_with_style(text, style):
249
- return generate(
250
  text,
251
  temperature=0.3,
252
  max_tokens=1024,
@@ -254,10 +254,7 @@ with gr.Blocks(
254
  repetition_penalty=1.1,
255
  top_p=0.95,
256
  prompt_style=STYLE_PROMPTS[style]
257
- )
258
-
259
- generate_btn.click(
260
- fn=format_with_style,
261
  inputs=[input_text, style_dropdown],
262
  outputs=output_text,
263
  )
 
245
  )
246
 
247
  # Event handlers for button actions to process and clear text
248
+ generate_btn.click(
249
+ fn=lambda text, style: generate(
250
  text,
251
  temperature=0.3,
252
  max_tokens=1024,
 
254
  repetition_penalty=1.1,
255
  top_p=0.95,
256
  prompt_style=STYLE_PROMPTS[style]
257
+ ),
 
 
 
258
  inputs=[input_text, style_dropdown],
259
  outputs=output_text,
260
  )