Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -157,4 +157,27 @@ theme = gr.themes.Monochrome(
|
|
157 |
button_primary_background_fill_dark='*secondary_300'
|
158 |
)
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
|
|
157 |
button_primary_background_fill_dark='*secondary_300'
|
158 |
)
|
159 |
|
160 |
+
with gr.Blocks(theme=theme) as demo:
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
gr.Image(display_image(), container = False, show_share_button = False, show_download_button = False, label="output", show_label=True, elem_id="output_image")
|
166 |
+
gr.Markdown(welcome_message) # Display the formatted welcome message
|
167 |
+
with gr.Row():
|
168 |
+
with gr.Column():
|
169 |
+
gr.Markdown(topics) # Show the topics on the left side
|
170 |
+
gr.HTML(display_iframe()) # Embed the iframe on the left side
|
171 |
+
with gr.Row():
|
172 |
+
with gr.Column():
|
173 |
+
question = gr.Textbox(label="Your question", placeholder="What do you want to ask Positivity+'s assistant Sunny about?")
|
174 |
+
answer = gr.Textbox(label="Sunny's Response", placeholder="Sunny will respond here...", interactive=False, lines=17)
|
175 |
+
submit_button = gr.Button("Submit")
|
176 |
+
submit_button.click(fn=query_model, inputs=question, outputs=answer)
|
177 |
+
with gr.Row():
|
178 |
+
big_block = gr.HTML("<button><a href='https://www.cdc.gov/mentalhealth/tools-resources/index.htm'>Mental Health Resources</a></button>")
|
179 |
+
big_block2 = gr.HTML("<button><a href='https://www.hopkinsmedicine.org/health/wellness-and-prevention/the-power-of-positive-thinking'>The Power of Positive Thinking</a></button>")
|
180 |
+
big_block3 = gr.HTML("<button><a href='https://newsinhealth.nih.gov/2015/08/positive-emotions-your-health'>How Positivity Keeps You Healthy</a></button>")
|
181 |
+
demo.launch()
|
182 |
+
|
183 |
|