Mel Seto commited on
Commit
7ce643e
·
1 Parent(s): 49ea7ef

use traditional checkbox

Browse files
Files changed (1) hide show
  1. src/app.py +6 -7
src/app.py CHANGED
@@ -155,8 +155,7 @@ def launch_app():
155
  placeholder="e.g., When facing a big challenge",
156
  )
157
  generate_btn = gr.Button("✨ Find Idiom")
158
-
159
-
160
  # ✅ Example situations
161
  gr.Examples(
162
  examples=[
@@ -169,15 +168,15 @@ def launch_app():
169
  inputs=situation,
170
  )
171
 
 
172
  with gr.Column():
173
- char_mode = gr.Radio(
174
- choices=["Simplified", "Traditional"],
175
- value="Traditional", # default selection
176
- label="",
177
- type="index" # will pass 0 for Simplified, 1 for Traditional
178
  )
179
  idiom_output = gr.HTML(label="Idiom")
180
  explanation_output = gr.HTML(label="Explanation")
 
181
 
182
  # pylint: disable=no-member
183
  generate_btn.click(
 
155
  placeholder="e.g., When facing a big challenge",
156
  )
157
  generate_btn = gr.Button("✨ Find Idiom")
158
+
 
159
  # ✅ Example situations
160
  gr.Examples(
161
  examples=[
 
168
  inputs=situation,
169
  )
170
 
171
+
172
  with gr.Column():
173
+ char_mode = gr.Checkbox(
174
+ label="Show Traditional",
175
+ value = True,
 
 
176
  )
177
  idiom_output = gr.HTML(label="Idiom")
178
  explanation_output = gr.HTML(label="Explanation")
179
+
180
 
181
  # pylint: disable=no-member
182
  generate_btn.click(