Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -140,44 +140,4 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
|
140 |
# Launch the Gradio app to allow user interaction
|
141 |
demo.launch(share = True)
|
142 |
|
143 |
-
theme = gr.themes.Monochrome(
|
144 |
-
primary_hue="amber",
|
145 |
-
secondary_hue="rose",
|
146 |
-
).set(
|
147 |
-
background_fill_primary='*primary_200',
|
148 |
-
background_fill_primary_dark='*primary_200',
|
149 |
-
background_fill_secondary='*secondary_300',
|
150 |
-
background_fill_secondary_dark='*secondary_300',
|
151 |
-
border_color_accent='*secondary_200',
|
152 |
-
border_color_accent_dark='*secondary_600',
|
153 |
-
border_color_accent_subdued='*secondary_200',
|
154 |
-
border_color_primary='*secondary_300',
|
155 |
-
block_border_color='*secondary_200',
|
156 |
-
button_primary_background_fill='*secondary_300',
|
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 |
|
|
|
140 |
# Launch the Gradio app to allow user interaction
|
141 |
demo.launch(share = True)
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|