Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ import time
|
|
6 |
cached_result = None
|
7 |
last_fetch_time = 0
|
8 |
TTL = float(os.getenv("TTL_IN_SECONDS", 3600))
|
9 |
-
initial_markdown = get_pulse_news
|
10 |
|
11 |
def get_cached_pulse():
|
12 |
global cached_result, last_fetch_time
|
@@ -29,7 +28,7 @@ with gr.Blocks() as demo:
|
|
29 |
with gr.Row():
|
30 |
refresh_button = gr.Button("Refresh")
|
31 |
clear_button = gr.Button("Clear")
|
32 |
-
markdown_display = gr.Markdown(
|
33 |
|
34 |
# Set up the button to call refresh_website when clicked.
|
35 |
refresh_button.click(fn=refresh_website, inputs=[], outputs=markdown_display)
|
|
|
6 |
cached_result = None
|
7 |
last_fetch_time = 0
|
8 |
TTL = float(os.getenv("TTL_IN_SECONDS", 3600))
|
|
|
9 |
|
10 |
def get_cached_pulse():
|
11 |
global cached_result, last_fetch_time
|
|
|
28 |
with gr.Row():
|
29 |
refresh_button = gr.Button("Refresh")
|
30 |
clear_button = gr.Button("Clear")
|
31 |
+
markdown_display = gr.Markdown() # This will display the fetched markdown text
|
32 |
|
33 |
# Set up the button to call refresh_website when clicked.
|
34 |
refresh_button.click(fn=refresh_website, inputs=[], outputs=markdown_display)
|