kgourgou commited on
Commit
bf63770
·
verified ·
1 Parent(s): dea1cda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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.inputs.Textbox(lines=3, placeholder="Enter your prompt here...", label="Prompt"),
33
  outputs=[
34
- gr.outputs.Textbox(label="Greedy"),
35
- gr.outputs.Textbox(label="Beam Search"),
36
- gr.outputs.Textbox(label="Top-k Sampling"),
37
- gr.outputs.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."
 
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."