Dannyar608 commited on
Commit
595772e
Β·
verified Β·
1 Parent(s): d5b6f6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -131,7 +131,7 @@ def generate_motivation_section(responses):
131
  hopes = [ans for q, ans in responses.items() if "hope" in q.lower() or "dream" in q.lower()]
132
  return f"""
133
  πŸ’‘ **Motivational Summary**
134
- Your dreams are powerful: {'; '.join(hopes) if hopes else 'You are filled with potential!'}.
135
  Believe in yourself and keep moving forward.
136
  """
137
 
@@ -206,7 +206,9 @@ with gr.Blocks() as demo:
206
  category_inputs.append(gr.Textbox(label=q_text))
207
 
208
  blog_checkbox = gr.Checkbox(label="πŸ“ I'd like to write a mini blog about myself")
209
- blog_text = gr.Textbox(lines=5, label="✍️ Mini Blog", visible=True)
 
 
210
 
211
  submit = gr.Button("πŸ“… Save My Profile")
212
  output = gr.Textbox(label="Status")
@@ -217,3 +219,5 @@ with gr.Blocks() as demo:
217
 
218
  if __name__ == '__main__':
219
  demo.launch()
 
 
 
131
  hopes = [ans for q, ans in responses.items() if "hope" in q.lower() or "dream" in q.lower()]
132
  return f"""
133
  πŸ’‘ **Motivational Summary**
134
+ Your dreams are powerful: {'; '.join(hopes) if hopes else 'You are filled with potential!'}.
135
  Believe in yourself and keep moving forward.
136
  """
137
 
 
206
  category_inputs.append(gr.Textbox(label=q_text))
207
 
208
  blog_checkbox = gr.Checkbox(label="πŸ“ I'd like to write a mini blog about myself")
209
+ blog_text = gr.Textbox(lines=5, label="✍️ Mini Blog", visible=False)
210
+
211
+ blog_checkbox.change(fn=lambda x: gr.update(visible=x), inputs=blog_checkbox, outputs=blog_text)
212
 
213
  submit = gr.Button("πŸ“… Save My Profile")
214
  output = gr.Textbox(label="Status")
 
219
 
220
  if __name__ == '__main__':
221
  demo.launch()
222
+
223
+