File size: 1,006 Bytes
52b4849
 
 
00bf61a
 
 
235df9c
00bf61a
52b4849
00bf61a
 
 
 
 
 
 
 
 
 
52b4849
00bf61a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
from geo_agent import scrape_website, run_agent_analysis

st.set_page_config(page_title="Generative Engine Optimization (GEO) Agent MVP")
st.title("🌐 Generative Engine Optimization (GEO) Agent")
st.markdown("Enter a **full URL** below to get a GEO Audit Score based on AI-readiness. The agent scrapes the content and uses GPT-4o-mini for analysis.")

url = st.text_input("Enter the full URL (e.g., https://example.com/blog-post):")

if st.button("Run GEO Audit") and url:
       with st.spinner('Scraping content and running AI analysis...'):
      
        analysis_data, full_content_string = scrape_website(url)
        
        if "Error" in analysis_data:
            st.error(analysis_data["Error"])
        else:
            
            ai_response = run_agent_analysis(url, analysis_data, full_content_string)
            
            st.success(f"GEO Agent Audit Complete for: {url}")
            st.code(ai_response, language='markdown') # Display the structured output