finalf0 commited on
Commit
1710fff
1 Parent(s): 861ad68
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -91,6 +91,7 @@ temperature_slider = {
91
  def create_component(params, comp='Slider'):
92
  if comp == 'Slider':
93
  return gr.Slider(
 
94
  minimum=params['minimum'],
95
  maximum=params['maximum'],
96
  value=params['value'],
@@ -100,6 +101,7 @@ def create_component(params, comp='Slider'):
100
  )
101
  elif comp == 'Radio':
102
  return gr.Radio(
 
103
  choices=params['choices'],
104
  value=params['value'],
105
  interactive=params['interactive'],
@@ -107,6 +109,7 @@ def create_component(params, comp='Slider'):
107
  )
108
  elif comp == 'Button':
109
  return gr.Button(
 
110
  value=params['value'],
111
  interactive=True
112
  )
@@ -194,7 +197,7 @@ def regenerate_button_clicked(_question, _chat_bot, _app_cfg, params_form, num_b
194
  with gr.Blocks() as demo:
195
  with gr.Row():
196
  with gr.Column(scale=1, min_width=300):
197
- params_form = create_component(form_radio, comp='Radio', visible=True)
198
  with gr.Accordion("Beam Search") as beams_according:
199
  num_beams = create_component(num_beams_slider)
200
  repetition_penalty = create_component(repetition_penalty_slider)
 
91
  def create_component(params, comp='Slider'):
92
  if comp == 'Slider':
93
  return gr.Slider(
94
+ visible=True,
95
  minimum=params['minimum'],
96
  maximum=params['maximum'],
97
  value=params['value'],
 
101
  )
102
  elif comp == 'Radio':
103
  return gr.Radio(
104
+ visible=True,
105
  choices=params['choices'],
106
  value=params['value'],
107
  interactive=params['interactive'],
 
109
  )
110
  elif comp == 'Button':
111
  return gr.Button(
112
+ visible=True,
113
  value=params['value'],
114
  interactive=True
115
  )
 
197
  with gr.Blocks() as demo:
198
  with gr.Row():
199
  with gr.Column(scale=1, min_width=300):
200
+ params_form = create_component(form_radio, comp='Radio')
201
  with gr.Accordion("Beam Search") as beams_according:
202
  num_beams = create_component(num_beams_slider)
203
  repetition_penalty = create_component(repetition_penalty_slider)