Spaces:
Running
Running
| 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 |