codys12 commited on
Commit
3ef00a8
1 Parent(s): 5976549

add rep slider

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -34,7 +34,7 @@ def generate(
34
  #temperature: float = 0.6,
35
  #top_p: float = 0.9,
36
  #top_k: int = 50,
37
- #repetition_penalty: float = 1.2,
38
  ) -> Iterator[str]:
39
  conversation = []
40
  current_input = ""
@@ -64,7 +64,7 @@ def generate(
64
  #top_k=top_k,
65
  #temperature=temperature,
66
  #num_beams=1,
67
- repetition_penalty=1.0,#repetition_penalty,
68
  )
69
  t = Thread(target=model.generate, kwargs=generate_kwargs)
70
  t.start()
@@ -108,13 +108,13 @@ chat_interface = gr.ChatInterface(
108
  # step=1,
109
  # value=50,
110
  # ),
111
- # gr.Slider(
112
- # label="Repetition penalty",
113
- # minimum=1.0,
114
- # maximum=2.0,
115
- # step=0.05,
116
- # value=1.2,
117
- # ),
118
  ],
119
  stop_btn=None,
120
  examples=[
 
34
  #temperature: float = 0.6,
35
  #top_p: float = 0.9,
36
  #top_k: int = 50,
37
+ repetition_penalty: float = 1.2,
38
  ) -> Iterator[str]:
39
  conversation = []
40
  current_input = ""
 
64
  #top_k=top_k,
65
  #temperature=temperature,
66
  #num_beams=1,
67
+ repetition_penalty=repetition_penalty,
68
  )
69
  t = Thread(target=model.generate, kwargs=generate_kwargs)
70
  t.start()
 
108
  # step=1,
109
  # value=50,
110
  # ),
111
+ gr.Slider(
112
+ label="Repetition penalty",
113
+ minimum=1.0,
114
+ maximum=2.0,
115
+ step=0.05,
116
+ value=1.2,
117
+ ),
118
  ],
119
  stop_btn=None,
120
  examples=[