DrishtiSharma commited on
Commit
2b2e797
·
verified ·
1 Parent(s): ca916f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -16,10 +16,6 @@ def display_agent_activity(prompt, result):
16
  st.write("**Agent Output:**")
17
  st.code(result, language="text")
18
 
19
- # Function to enhance generated content
20
- def enhance_content(content):
21
- return f"{content}\n\n---\nGenerated with insights and enhanced formatting."
22
-
23
  # Function to save content as a downloadable text file
24
  def generate_text_download(content, filename="generated_blog.txt"):
25
  with tempfile.NamedTemporaryFile(delete=False, suffix=".txt") as tmp_file:
@@ -63,10 +59,8 @@ with tabs[0]:
63
  with st.spinner("Generating blog content, please wait..."):
64
  try:
65
  # Generate blog content using the agent
66
- blog_result = content_agent.run(f"{blog_prompt}\nTone: {tone}")
67
-
68
- # Optionally enhance the content
69
- blog_result = enhance_content(blog_result)
70
 
71
  # Display the generated blog content
72
  st.subheader("Generated Blog Content")
 
16
  st.write("**Agent Output:**")
17
  st.code(result, language="text")
18
 
 
 
 
 
19
  # Function to save content as a downloadable text file
20
  def generate_text_download(content, filename="generated_blog.txt"):
21
  with tempfile.NamedTemporaryFile(delete=False, suffix=".txt") as tmp_file:
 
59
  with st.spinner("Generating blog content, please wait..."):
60
  try:
61
  # Generate blog content using the agent
62
+ agent_prompt = f"Write a comprehensive, well-structured, and rich blog post on the following topic:\n{blog_prompt}\nTone: {tone}"
63
+ blog_result = content_agent.run(agent_prompt)
 
 
64
 
65
  # Display the generated blog content
66
  st.subheader("Generated Blog Content")