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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -66,27 +66,6 @@ def generate_social_media_post(article_text):
66
  return summary
67
 
68
 
69
- # Define the page for social media content generation
70
- def page_social_media_generator():
71
- st.title("Social Media Content Generator")
72
-
73
- # Retrieve the description saved in the session state on the trending niche page
74
- description = st.session_state.get('selected_article_description', '')
75
-
76
- # Display the selected article description (if available)
77
- if description:
78
- st.write(f"Selected Article Description: {description}")
79
-
80
- # Button to trigger social media post generation
81
- if st.button('Generate Social Media Post'):
82
- with st.spinner('Generating...'):
83
- # Call the function to generate the post
84
- post_content = generate_social_media_post(description)
85
- st.success('Generated Content:')
86
- st.write(post_content)
87
- else:
88
- # Prompt the user to select an article if none has been selected
89
- st.write("Please select an article from the 'What is trending in my niche?' page.")
90
 
91
 
92
  def page_article_to_social_post():
@@ -138,14 +117,12 @@ st.sidebar.title("Anne's Current Projects :star2:")
138
 
139
  page = st.sidebar.selectbox(
140
  'What project do you like to see first?',
141
- ('trending_niche', 'Social Media Content Generator', 'page_article_to_social_post', 'Test Page'))
142
 
143
 
144
  # Display the selected page
145
  if page == 'trending_niche':
146
  page_trending_niche()
147
- elif page == 'Social Media Content Generator':
148
- page_social_media_generator()
149
  elif page == 'page_article_to_social_post':
150
  page_article_to_social_post()
151
  elif page == 'Test Page':
 
66
  return summary
67
 
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
 
71
  def page_article_to_social_post():
 
117
 
118
  page = st.sidebar.selectbox(
119
  'What project do you like to see first?',
120
+ ('trending_niche', 'page_article_to_social_post', 'Test Page'))
121
 
122
 
123
  # Display the selected page
124
  if page == 'trending_niche':
125
  page_trending_niche()
 
 
126
  elif page == 'page_article_to_social_post':
127
  page_article_to_social_post()
128
  elif page == 'Test Page':