AI SEO tools - Readibility & Analysis, Agents content ideator

This commit is contained in:
ajaysi
2024-09-04 21:51:52 +05:30
parent 14879b9c97
commit ca8618a6a4
14 changed files with 1077 additions and 50 deletions

View File

@@ -37,3 +37,84 @@ def blog_proof_editor(blog_content):
return response
except Exception as err:
logger.error(f"Error Blog Proof Reading: {err}")
import streamlit as st
import requests
from bs4 import BeautifulSoup
import pandas as pd
import nltk
from nltk.tokenize import word_tokenize
from nltk.util import ngrams
from langchain.llms import OpenAI
from langchain.chains import ConversationChain
# ... (rest of your code)
if st.button("Analyze with AI!"):
# ... (fetch and process content as before)
with st.spinner('Analyzing your content...'):
st.subheader("AI Insights:")
st.write(" ")
# 1. Overall Critique
st.markdown("**Overall Evaluation:**")
ai_overall = conversation_chain.run(f"""Analyze the provided article and give a constructive critique, focusing on its strengths and weaknesses regarding:
* Informativeness: Does it offer valuable information the reader might not know, or strengthen their understanding?
* Authority: Does the author demonstrate expertise and credibility, backing up claims with evidence?
* Captivatingness: Does it effectively engage the reader, capture attention, and make them want to continue reading?
Provide specific examples to support your evaluation.
""")
st.markdown(f" {ai_overall}")
st.write(" ")
# 2. Structure & Organization
st.markdown("**Structure and Organization:**")
ai_structure = conversation_chain.run(f"""Analyze the structure and organization of the provided article.
* Does it flow logically, with a clear beginning, middle, and end?
* Are subheadings effectively used to break down the content and guide the reader?
* Is the writing style consistent throughout the article?
Suggest improvements for clarity and readability.
""")
st.markdown(f" {ai_structure}")
st.write(" ")
# 3. Content Quality
st.markdown("**Content Quality:**")
ai_content = conversation_chain.run(f"""Critique the content of the article, considering:
* Is the value of the article clear?
* Does it address a pain point or a need for the target audience?
* Are the arguments compelling and supported by evidence or examples?
* Are any technical terms explained well?
Identify areas where the content could be strengthened or improved.
""")
st.markdown(f" {ai_content}")
st.write(" ")
# 4. Call to Action & Headline
st.markdown("**Headline and Call to Action:**")
ai_headline = conversation_chain.run(f"""Evaluate the effectiveness of the headline and call to action (CTA) in the provided article.
* Does the headline accurately and compellingly summarize the article's content?
* Is the CTA clear, actionable, and positioned well within the text?
Provide suggestions for improving the headline and CTA.
""")
st.markdown(f" {ai_headline}")
st.write(" ")
# 5. Writing Style & Tone
st.markdown("**Writing Style and Tone:**")
ai_style = conversation_chain.run(f"""Assess the overall writing style and tone of the article.
* Does it use jargon or overly technical language that might be inaccessible to the target audience?
* Is the tone appropriate for the topic and target audience (e.g., professional, conversational, humorous)?
* Is the writing clear, concise, and engaging?
Suggest ways to improve the writing style and make the article more accessible and compelling for the intended reader.
""")
st.markdown(f" {ai_style}")
# --- Display Keyword Results (same as before) ---
# ... (rest of your code)