osanseviero
commited on
Commit
•
5063494
1
Parent(s):
51cf19b
Update app.py
Browse files
app.py
CHANGED
@@ -82,14 +82,14 @@ def adjust_distribution(temperature, top_k, top_p, initial_probs):
|
|
82 |
|
83 |
initial_probs = get_initial_distribution()
|
84 |
|
85 |
-
def update_plot(temperature, top_k, top_p):
|
86 |
return adjust_distribution(temperature, top_k, top_p, initial_probs)
|
87 |
|
88 |
interface = gr.Interface(
|
89 |
fn=update_plot,
|
90 |
inputs=[
|
91 |
gr.Slider(0, 5.0, step=0.1, value=1.0, label="Temperature"),
|
92 |
-
gr.Slider(0, 10, step=1, value=
|
93 |
gr.Slider(0.0, 1.0, step=0.01, value=0.9, label="Top-p"),
|
94 |
],
|
95 |
outputs=gr.Plot(label="Token Probability Distribution"),
|
|
|
82 |
|
83 |
initial_probs = get_initial_distribution()
|
84 |
|
85 |
+
def update_plot(temperature=1.0, top_k=8, top_p=0.9):
|
86 |
return adjust_distribution(temperature, top_k, top_p, initial_probs)
|
87 |
|
88 |
interface = gr.Interface(
|
89 |
fn=update_plot,
|
90 |
inputs=[
|
91 |
gr.Slider(0, 5.0, step=0.1, value=1.0, label="Temperature"),
|
92 |
+
gr.Slider(0, 10, step=1, value=8, label="Top-k"),
|
93 |
gr.Slider(0.0, 1.0, step=0.01, value=0.9, label="Top-p"),
|
94 |
],
|
95 |
outputs=gr.Plot(label="Token Probability Distribution"),
|