Add Radio
Browse files
app.py
CHANGED
|
@@ -176,12 +176,14 @@ with demo:
|
|
| 176 |
- `pad_multiple = 64` for Tensorflow XLA models. Others do not pad (input prompts between 2 and 33 tokens).
|
| 177 |
"""
|
| 178 |
)
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
|
|
|
| 185 |
plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
|
| 186 |
plot = gr.Plot(value=plot_fn("T5 Small")) # Show plot when the gradio app is initialized
|
| 187 |
model_selector.change(fn=plot_fn, inputs=model_selector, outputs=plot)
|
|
|
|
| 176 |
- `pad_multiple = 64` for Tensorflow XLA models. Others do not pad (input prompts between 2 and 33 tokens).
|
| 177 |
"""
|
| 178 |
)
|
| 179 |
+
with gr.Row():
|
| 180 |
+
model_selector = gr.Dropdown(
|
| 181 |
+
choices=["DistilGPT2", "GPT2", "OPT-1.3B", "GPTJ-6B", "T5 Small", "T5 Base", "T5 Large", "T5 3B"],
|
| 182 |
+
value="T5 Small",
|
| 183 |
+
label="Model",
|
| 184 |
+
interactive=True,
|
| 185 |
+
)
|
| 186 |
+
eager_enabler = gr.Radio(["Yes", "No"], value="Yes", label="Plot TF Eager Execution?")
|
| 187 |
plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
|
| 188 |
plot = gr.Plot(value=plot_fn("T5 Small")) # Show plot when the gradio app is initialized
|
| 189 |
model_selector.change(fn=plot_fn, inputs=model_selector, outputs=plot)
|