RChaubey16's picture
Update app.py
b34b053 verified
import streamlit as st
from research_agent import research_agent
def main():
st.set_page_config(
page_title="Website Summary Generator",
page_icon="πŸ“š",
layout="wide"
)
st.title("πŸ“š Website Summary Generator")
st.markdown("Enter a URL to generate a detailed summary report using AI.")
# URL input
url = st.text_input("Enter URL to analyze:",
placeholder="https://example.com")
if st.button("Generate Report"):
if url:
with st.spinner("Generating report... This may take a few minutes."):
try:
research_report_response = research_agent.run(f"Analyze this URL thoroughly and create a detailed research report: {url}")
st.markdown("### Research Report")
st.markdown(research_report_response.content)
except Exception as e:
st.error(f"An error occurred: {str(e)}")
else:
st.warning("Please enter a URL first.")
# Add sidebar with information
with st.sidebar:
st.markdown("### About")
st.markdown("""
This tool uses AI to generate detailed research reports from web content.
The report includes:
- Executive Summary
- Key Findings
- Detailed Analysis
- Supporting Data/Statistics
- Conclusions
""")
if __name__ == "__main__":
main()