ayan4m1 commited on
Commit
9f453e8
·
1 Parent(s): 49ecfa7

fix: param name

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ client = InferenceClient(model="pszemraj/distilgpt2-magicprompt-SD")
10
  def respond(
11
  message,
12
  _: list[tuple[str, str]],
13
- max_tokens: int,
14
  temperature: float,
15
  top_p: float,
16
  top_k: int
@@ -19,7 +19,7 @@ def respond(
19
 
20
  for message in client.text_generation(
21
  message,
22
- max_tokens=max_tokens,
23
  stream=True,
24
  temperature=temperature,
25
  top_p=top_p,
@@ -37,7 +37,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
37
  demo = gr.ChatInterface(
38
  respond,
39
  additional_inputs=[
40
- gr.Slider(minimum=8, maximum=128, value=64, step=8, label="Max tokens"),
41
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
42
  gr.Slider(
43
  minimum=0.1,
 
10
  def respond(
11
  message,
12
  _: list[tuple[str, str]],
13
+ max_new_tokens: int,
14
  temperature: float,
15
  top_p: float,
16
  top_k: int
 
19
 
20
  for message in client.text_generation(
21
  message,
22
+ max_new_tokens=max_new_tokens,
23
  stream=True,
24
  temperature=temperature,
25
  top_p=top_p,
 
37
  demo = gr.ChatInterface(
38
  respond,
39
  additional_inputs=[
40
+ gr.Slider(minimum=8, maximum=128, value=64, step=8, label="Max new tokens"),
41
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
42
  gr.Slider(
43
  minimum=0.1,