Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -151,14 +151,29 @@ def text_generate_old(prompt, generated_txt):
|
|
151 |
display_output = display_output[:-1]
|
152 |
return display_output, new_prompt
|
153 |
|
|
|
154 |
demo = gr.Blocks()
|
|
|
155 |
with demo:
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
display_output = display_output[:-1]
|
152 |
return display_output, new_prompt
|
153 |
|
154 |
+
# An insightful and engaging self-care health care demo
|
155 |
demo = gr.Blocks()
|
156 |
+
|
157 |
with demo:
|
158 |
+
with gr.Row():
|
159 |
+
input_prompt = gr.Textbox(
|
160 |
+
label="Write a self-care or health care related question to get started...",
|
161 |
+
lines=3,
|
162 |
+
value="Dear AI, please tell me about the importance of self-care and how it contributes to overall health and well-being.",
|
163 |
+
)
|
164 |
+
|
165 |
+
with gr.Row():
|
166 |
+
generated_txt = gr.Textbox(lines=5, visible=True)
|
167 |
+
|
168 |
+
with gr.Row():
|
169 |
+
Thoughts = gr.Textbox(lines=10, visible=True)
|
170 |
+
|
171 |
+
gen = gr.Button("Discover Health Insights")
|
172 |
+
|
173 |
+
gen.click(
|
174 |
+
text_generate,
|
175 |
+
inputs=[input_prompt, generated_txt],
|
176 |
+
outputs=[generated_txt, input_prompt, Thoughts],
|
177 |
+
)
|
178 |
+
|
179 |
+
demo.launch(enable_queue=True, debug=True)
|