Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,15 +26,15 @@ def generate_completions(prompt):
|
|
26 |
|
27 |
return results["Greedy"], results["Beam Search"], results["Top-k Sampling"], results["Top-p Sampling"]
|
28 |
|
29 |
-
# Define the Gradio interface
|
30 |
interface = gr.Interface(
|
31 |
fn=generate_completions,
|
32 |
-
inputs=gr.
|
33 |
outputs=[
|
34 |
-
gr.
|
35 |
-
gr.
|
36 |
-
gr.
|
37 |
-
gr.
|
38 |
],
|
39 |
title="LLM Decoding Strategies Comparison",
|
40 |
description="Enter a prompt to see how different decoding strategies affect the output of a language model."
|
|
|
26 |
|
27 |
return results["Greedy"], results["Beam Search"], results["Top-k Sampling"], results["Top-p Sampling"]
|
28 |
|
29 |
+
# Define the Gradio interface using the updated API
|
30 |
interface = gr.Interface(
|
31 |
fn=generate_completions,
|
32 |
+
inputs=gr.Textbox(lines=3, placeholder="Enter your prompt here...", label="Prompt"),
|
33 |
outputs=[
|
34 |
+
gr.Textbox(label="Greedy"),
|
35 |
+
gr.Textbox(label="Beam Search"),
|
36 |
+
gr.Textbox(label="Top-k Sampling"),
|
37 |
+
gr.Textbox(label="Top-p Sampling"),
|
38 |
],
|
39 |
title="LLM Decoding Strategies Comparison",
|
40 |
description="Enter a prompt to see how different decoding strategies affect the output of a language model."
|