Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,6 @@ def run_generation(user_text, use_assistant, temperature, max_new_tokens):
|
|
| 50 |
for new_text in streamer:
|
| 51 |
model_output += new_text
|
| 52 |
yield [model_output, round(time.time() - start, 3)]
|
| 53 |
-
# return [model_output, round(time.time() - start, 3)]
|
| 54 |
|
| 55 |
|
| 56 |
def reset_textbox():
|
|
@@ -81,7 +80,7 @@ with gr.Blocks() as demo:
|
|
| 81 |
minimum=1, maximum=500, value=100, step=1, interactive=True, label="Max New Tokens",
|
| 82 |
)
|
| 83 |
temperature = gr.Slider(
|
| 84 |
-
minimum=0.0, maximum=2.0, value=0.
|
| 85 |
)
|
| 86 |
gr.Markdown("### Generation time (seconds)")
|
| 87 |
generation_time = gr.Textbox(lines=1, interactive=False, show_label=False)
|
|
|
|
| 50 |
for new_text in streamer:
|
| 51 |
model_output += new_text
|
| 52 |
yield [model_output, round(time.time() - start, 3)]
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
def reset_textbox():
|
|
|
|
| 80 |
minimum=1, maximum=500, value=100, step=1, interactive=True, label="Max New Tokens",
|
| 81 |
)
|
| 82 |
temperature = gr.Slider(
|
| 83 |
+
minimum=0.0, maximum=2.0, value=0.6, step=0.05, interactive=True, label="Temperature (0.0 = Greedy)",
|
| 84 |
)
|
| 85 |
gr.Markdown("### Generation time (seconds)")
|
| 86 |
generation_time = gr.Textbox(lines=1, interactive=False, show_label=False)
|