Update app.py
Browse files
app.py
CHANGED
|
@@ -18,14 +18,16 @@ with gr.Blocks() as demo:
|
|
| 18 |
difficulty = gr.Dropdown(["easy", "medium", "hard"], label="Difficulty")
|
| 19 |
num = gr.Slider(1, 5, step=1, label="Number of Questions", value=1)
|
| 20 |
|
| 21 |
-
with gr.Row(visible=True) as beam_controls:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
-
def toggle_beam_controls(n):
|
| 26 |
-
|
| 27 |
|
| 28 |
-
num.change(fn=toggle_beam_controls, inputs=num, outputs=beam_controls)
|
|
|
|
|
|
|
| 29 |
|
| 30 |
with gr.Row():
|
| 31 |
btn = gr.Button("Generate Questions")
|
|
|
|
| 18 |
difficulty = gr.Dropdown(["easy", "medium", "hard"], label="Difficulty")
|
| 19 |
num = gr.Slider(1, 5, step=1, label="Number of Questions", value=1)
|
| 20 |
|
| 21 |
+
# with gr.Row(visible=True) as beam_controls:
|
| 22 |
+
# use_beam = gr.Checkbox(label="Use Beam Search", value=False)
|
| 23 |
+
# beam_dropdown = gr.Dropdown(choices=[3, 4, 5, 6], value=3, label="Number of Beams")
|
| 24 |
|
| 25 |
+
# def toggle_beam_controls(n):
|
| 26 |
+
# return gr.update(visible=(n == 1))
|
| 27 |
|
| 28 |
+
# num.change(fn=toggle_beam_controls, inputs=num, outputs=beam_controls)
|
| 29 |
+
use_beam = False
|
| 30 |
+
beam_dropdown = 1
|
| 31 |
|
| 32 |
with gr.Row():
|
| 33 |
btn = gr.Button("Generate Questions")
|