Spaces:
Running
Running
Update app.py
Browse files
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=
|
|
|
|
|
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 |
+
|