DrishtiSharma commited on
Commit
a7091bf
Β·
verified Β·
1 Parent(s): fbe3161

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -37,11 +37,10 @@ def main():
37
  if st.button("Generate Post"):
38
  with st.spinner("Generating your post..."):
39
  try:
 
40
  post = generate_post(selected_length, selected_language, selected_tag, selected_tone)
41
 
42
- # Add tone and context dynamically
43
- #if selected_tone:
44
- #post = f"**Tone**: {selected_tone}\n\n{post}"
45
  if custom_context:
46
  post += f"\n\n**Additional Context**: {custom_context}"
47
 
@@ -98,8 +97,9 @@ def main():
98
  else:
99
  st.info("No posts to save or share.")
100
 
 
101
  st.sidebar.markdown("---")
102
- st.sidebar.markdown("Reference:")
103
  st.sidebar.markdown("[Linkedin Post Generator - Codebasics](https://www.youtube.com/watch?v=qZ_J-Xg0QM4)")
104
 
105
 
@@ -138,4 +138,4 @@ def download_posts(posts):
138
 
139
 
140
  if __name__ == "__main__":
141
- main()
 
37
  if st.button("Generate Post"):
38
  with st.spinner("Generating your post..."):
39
  try:
40
+ # Generate the post using post_generator.py
41
  post = generate_post(selected_length, selected_language, selected_tag, selected_tone)
42
 
43
+ # Add additional context dynamically if provided
 
 
44
  if custom_context:
45
  post += f"\n\n**Additional Context**: {custom_context}"
46
 
 
97
  else:
98
  st.info("No posts to save or share.")
99
 
100
+ # Add reference and credits in the sidebar
101
  st.sidebar.markdown("---")
102
+ st.sidebar.markdown("### Reference:")
103
  st.sidebar.markdown("[Linkedin Post Generator - Codebasics](https://www.youtube.com/watch?v=qZ_J-Xg0QM4)")
104
 
105
 
 
138
 
139
 
140
  if __name__ == "__main__":
141
+ main()