Anne314159 commited on
Commit
b028844
·
verified ·
1 Parent(s): 797de85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- # Show a snippet of the article to the user
98
- st.write(article_text[:500], "...")
 
 
 
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