Spaces:
Sleeping
Sleeping
shamik
commited on
Commit
·
1852c45
1
Parent(s):
e5bbd4c
Updated the default temperature.
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def format_prompt(message, history):
|
|
| 15 |
return prompt
|
| 16 |
|
| 17 |
def generate(
|
| 18 |
-
prompt, history, temperature=
|
| 19 |
):
|
| 20 |
temperature = float(temperature)
|
| 21 |
if temperature < 1e-2:
|
|
@@ -45,7 +45,7 @@ def generate(
|
|
| 45 |
additional_inputs=[
|
| 46 |
gr.Slider(
|
| 47 |
label="Temperature",
|
| 48 |
-
value=0
|
| 49 |
minimum=0.0,
|
| 50 |
maximum=1.0,
|
| 51 |
step=0.05,
|
|
@@ -72,7 +72,7 @@ additional_inputs=[
|
|
| 72 |
),
|
| 73 |
gr.Slider(
|
| 74 |
label="Repetition penalty",
|
| 75 |
-
value=1.
|
| 76 |
minimum=1.0,
|
| 77 |
maximum=2.0,
|
| 78 |
step=0.05,
|
|
|
|
| 15 |
return prompt
|
| 16 |
|
| 17 |
def generate(
|
| 18 |
+
prompt, history, temperature=0, max_new_tokens=256, top_p=0.8, repetition_penalty=1.0,
|
| 19 |
):
|
| 20 |
temperature = float(temperature)
|
| 21 |
if temperature < 1e-2:
|
|
|
|
| 45 |
additional_inputs=[
|
| 46 |
gr.Slider(
|
| 47 |
label="Temperature",
|
| 48 |
+
value=0,
|
| 49 |
minimum=0.0,
|
| 50 |
maximum=1.0,
|
| 51 |
step=0.05,
|
|
|
|
| 72 |
),
|
| 73 |
gr.Slider(
|
| 74 |
label="Repetition penalty",
|
| 75 |
+
value=1.0,
|
| 76 |
minimum=1.0,
|
| 77 |
maximum=2.0,
|
| 78 |
step=0.05,
|