default value for decoding methods
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import os
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
from transformers import pipeline
|
@@ -36,7 +35,7 @@ with gr.Blocks() as demo:
|
|
36 |
user_input = gr.inputs.Textbox(placeholder="",
|
37 |
label="Ask me something in Indonesian or English",
|
38 |
default="Bagaimana cara mendidik anak supaya tidak berbohong?")
|
39 |
-
decoding_methods = gr.Dropdown(["Beam Search", "Sampling", "Contrastive Search"])
|
40 |
top_k = gr.inputs.Slider(label="Top K: The number of highest probability vocabulary tokens to keep",
|
41 |
default=40, maximum=50, minimum=1, step=1)
|
42 |
top_p = gr.inputs.Slider(label="Top P", default=0.9, step=0.05, minimum=0.1, maximum=1.0)
|
|
|
|
|
1 |
import torch
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
|
|
35 |
user_input = gr.inputs.Textbox(placeholder="",
|
36 |
label="Ask me something in Indonesian or English",
|
37 |
default="Bagaimana cara mendidik anak supaya tidak berbohong?")
|
38 |
+
decoding_methods = gr.inputs.Dropdown(["Beam Search", "Sampling", "Contrastive Search"], "Beam Search")
|
39 |
top_k = gr.inputs.Slider(label="Top K: The number of highest probability vocabulary tokens to keep",
|
40 |
default=40, maximum=50, minimum=1, step=1)
|
41 |
top_p = gr.inputs.Slider(label="Top P", default=0.9, step=0.05, minimum=0.1, maximum=1.0)
|