2
0

autoregressive_params.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import gradio as gr
  2. def autoregressive_params():
  3. with gr.Accordion(label="Autoregressive Parameters", open=False):
  4. samples = gr.Slider(
  5. label="Samples",
  6. value=16,
  7. minimum=4,
  8. maximum=256,
  9. step=1,
  10. )
  11. temperature = gr.Slider(
  12. label="Temperature",
  13. value=0.8,
  14. minimum=0.0,
  15. maximum=1.0,
  16. step=0.1,
  17. )
  18. length_penalty = gr.Slider(
  19. label="Length Penalty",
  20. value=1.0,
  21. minimum=0.0,
  22. maximum=10.0,
  23. step=0.1,
  24. )
  25. repetition_penalty = gr.Slider(
  26. label="Repetition Penalty",
  27. value=2.0,
  28. minimum=0.0,
  29. maximum=10.0,
  30. step=0.1,
  31. )
  32. top_p = gr.Slider(
  33. label="Top P",
  34. value=0.8,
  35. minimum=0.0,
  36. maximum=1.0,
  37. step=0.1,
  38. )
  39. max_mel_tokens = gr.Slider(
  40. label="Max Mel Tokens",
  41. value=500,
  42. minimum=10,
  43. maximum=600,
  44. step=1,
  45. )
  46. return (
  47. samples,
  48. temperature,
  49. length_penalty,
  50. repetition_penalty,
  51. top_p,
  52. max_mel_tokens,
  53. )