Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,12 +90,16 @@ def page_article_to_social_post():
|
|
| 90 |
selected_article = next((item for item in news_list if item['title'] == selected_title), None)
|
| 91 |
if selected_article:
|
| 92 |
selected_url = selected_article['url']
|
| 93 |
-
|
|
|
|
| 94 |
if st.button('Fetch Full Article'):
|
| 95 |
# Fetch the full article text
|
| 96 |
article_text = fetch_full_article(selected_url)
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
# Store the full article text in session state for later use
|
| 101 |
st.session_state.full_article_text = article_text
|
|
|
|
| 90 |
selected_article = next((item for item in news_list if item['title'] == selected_title), None)
|
| 91 |
if selected_article:
|
| 92 |
selected_url = selected_article['url']
|
| 93 |
+
|
| 94 |
+
|
| 95 |
if st.button('Fetch Full Article'):
|
| 96 |
# Fetch the full article text
|
| 97 |
article_text = fetch_full_article(selected_url)
|
| 98 |
+
|
| 99 |
+
# Use an expander to display the article text in a scrollable view
|
| 100 |
+
with st.expander("See full article"):
|
| 101 |
+
st.text_area("Article Text", article_text, height=500) # Height is in pixels
|
| 102 |
+
|
| 103 |
|
| 104 |
# Store the full article text in session state for later use
|
| 105 |
st.session_state.full_article_text = article_text
|