Spaces:
Sleeping
Sleeping
Commit
·
5d13c4b
1
Parent(s):
65b4243
Remove top-p
Browse files
app.py
CHANGED
@@ -11,14 +11,12 @@ def respond(
|
|
11 |
system_message: str,
|
12 |
max_new_tokens: int,
|
13 |
temperature: float,
|
14 |
-
top_p: float,
|
15 |
) -> str:
|
16 |
"""
|
17 |
Respond to user input using the model.
|
18 |
"""
|
19 |
# Set the model parameters
|
20 |
model.temperature = temperature
|
21 |
-
model.top_p = top_p
|
22 |
model.max_output_tokens = max_new_tokens
|
23 |
|
24 |
history_langchain_format = []
|
@@ -51,13 +49,6 @@ demo = gr.ChatInterface(
|
|
51 |
step=1, label="Max new tokens"),
|
52 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7,
|
53 |
step=0.1, label="Temperature"),
|
54 |
-
gr.Slider(
|
55 |
-
minimum=0.1,
|
56 |
-
maximum=1.0,
|
57 |
-
value=0.95,
|
58 |
-
step=0.05,
|
59 |
-
label="Top-p (nucleus sampling)",
|
60 |
-
),
|
61 |
],
|
62 |
)
|
63 |
|
|
|
11 |
system_message: str,
|
12 |
max_new_tokens: int,
|
13 |
temperature: float,
|
|
|
14 |
) -> str:
|
15 |
"""
|
16 |
Respond to user input using the model.
|
17 |
"""
|
18 |
# Set the model parameters
|
19 |
model.temperature = temperature
|
|
|
20 |
model.max_output_tokens = max_new_tokens
|
21 |
|
22 |
history_langchain_format = []
|
|
|
49 |
step=1, label="Max new tokens"),
|
50 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7,
|
51 |
step=0.1, label="Temperature"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
],
|
53 |
)
|
54 |
|