Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def save_data_json(data):
|
|
| 32 |
|
| 33 |
# Streamlit UI
|
| 34 |
def main():
|
| 35 |
-
st.title("Visionary AI
|
| 36 |
st.write("Fill in the details to generate an AI-driven business strategy report.")
|
| 37 |
st.write("It uses SOTA (State-of-the-Art) Reasoning Models to provide cutting-edge insights and AI integration strategies.")
|
| 38 |
|
|
@@ -51,42 +51,57 @@ def main():
|
|
| 51 |
input_method = st.radio("How would you like to provide company details?",
|
| 52 |
("Search by Name", "Website URL", "Manual Description", "Upload Document"))
|
| 53 |
|
|
|
|
|
|
|
| 54 |
if input_method == "Search by Name":
|
| 55 |
if st.button("Find Company Details"):
|
|
|
|
| 56 |
st.session_state.company_data = search_company(company_name)
|
| 57 |
-
|
|
|
|
| 58 |
elif input_method == "Website URL":
|
| 59 |
website_url = st.text_input("Enter Website URL")
|
| 60 |
if st.button("Scrape Website"):
|
|
|
|
| 61 |
st.session_state.company_data = scrape_website(website_url)
|
| 62 |
-
|
|
|
|
| 63 |
elif input_method == "Manual Description":
|
| 64 |
company_data_input = st.text_area("Enter Company Description")
|
| 65 |
if st.button("Process Description"):
|
|
|
|
| 66 |
st.session_state.company_data = process_company_description(company_data_input)
|
| 67 |
-
|
|
|
|
| 68 |
elif input_method == "Upload Document":
|
| 69 |
uploaded_file = st.file_uploader("Upload PDF or PPT", type=["pdf", "pptx"])
|
| 70 |
if uploaded_file is not None:
|
|
|
|
| 71 |
st.session_state.company_data = process_uploaded_document(uploaded_file)
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
if st.session_state.company_data:
|
| 75 |
st.subheader("Extracted Company Information")
|
| 76 |
st.write(st.session_state.company_data)
|
|
|
|
| 77 |
|
| 78 |
industry = st.text_input("Industry Type (e.g., Healthcare, Finance)")
|
| 79 |
if st.button("Analyze Industry Trends"):
|
|
|
|
| 80 |
st.session_state.industry_trends = get_industry_trends(industry)
|
| 81 |
-
|
|
|
|
| 82 |
|
| 83 |
if st.session_state.industry_trends:
|
| 84 |
st.subheader("Industry Trends")
|
| 85 |
st.write(st.session_state.industry_trends)
|
| 86 |
|
| 87 |
if st.button("Find AI Use Cases"):
|
|
|
|
| 88 |
st.session_state.ai_use_cases = get_ai_use_cases(industry)
|
| 89 |
-
|
|
|
|
| 90 |
|
| 91 |
if st.session_state.ai_use_cases:
|
| 92 |
st.subheader("AI Use Cases")
|
|
@@ -94,49 +109,25 @@ def main():
|
|
| 94 |
|
| 95 |
competitor = st.text_input("Enter Competitor Name")
|
| 96 |
if st.button("Analyze Competitor AI Strategies"):
|
|
|
|
| 97 |
st.session_state.competitor_analysis = get_competitor_ai_strategies(competitor)
|
| 98 |
-
|
|
|
|
| 99 |
|
| 100 |
if st.session_state.competitor_analysis:
|
| 101 |
st.subheader("Competitor AI Strategies")
|
| 102 |
st.write(st.session_state.competitor_analysis)
|
| 103 |
|
| 104 |
if st.button("Generate AI Strategy"):
|
|
|
|
| 105 |
st.session_state.ai_strategy = generate_ai_strategy(
|
| 106 |
st.session_state.company_data, st.session_state.industry_trends,
|
| 107 |
st.session_state.ai_use_cases, st.session_state.competitor_analysis)
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
st.subheader("AI Strategy")
|
| 112 |
-
st.write(st.session_state.ai_strategy)
|
| 113 |
-
|
| 114 |
-
if st.button("Suggest AI Integration Plan"):
|
| 115 |
-
st.session_state.ai_integration = suggest_ai_integration(
|
| 116 |
-
st.session_state.company_data, st.session_state.ai_strategy)
|
| 117 |
-
st.experimental_rerun()
|
| 118 |
-
|
| 119 |
-
if st.session_state.ai_integration:
|
| 120 |
-
st.subheader("AI Integration Plan")
|
| 121 |
-
st.write(st.session_state.ai_integration)
|
| 122 |
-
|
| 123 |
-
if st.button("Identify Revenue Growth Opportunities"):
|
| 124 |
-
st.session_state.revenue_opportunities = identify_revenue_opportunities(
|
| 125 |
-
st.session_state.company_data, st.session_state.ai_strategy)
|
| 126 |
-
st.experimental_rerun()
|
| 127 |
-
|
| 128 |
-
if st.session_state.revenue_opportunities:
|
| 129 |
-
st.subheader("Revenue Growth Opportunities")
|
| 130 |
-
st.write(st.session_state.revenue_opportunities)
|
| 131 |
-
|
| 132 |
-
if st.button("Generate Final Report"):
|
| 133 |
-
report_filename = generate_report(
|
| 134 |
-
company_name, st.session_state.ai_strategy, st.session_state.ai_integration,
|
| 135 |
-
st.session_state.revenue_opportunities)
|
| 136 |
-
st.success(f"Report Generated: {report_filename}")
|
| 137 |
-
|
| 138 |
st.markdown("---")
|
| 139 |
-
st.markdown("**Developed by Aditya Ghadge for Giant Analytics**")
|
| 140 |
|
| 141 |
if __name__ == "__main__":
|
| 142 |
main()
|
|
|
|
| 32 |
|
| 33 |
# Streamlit UI
|
| 34 |
def main():
|
| 35 |
+
st.title("Visionary AI by Giant Analytics")
|
| 36 |
st.write("Fill in the details to generate an AI-driven business strategy report.")
|
| 37 |
st.write("It uses SOTA (State-of-the-Art) Reasoning Models to provide cutting-edge insights and AI integration strategies.")
|
| 38 |
|
|
|
|
| 51 |
input_method = st.radio("How would you like to provide company details?",
|
| 52 |
("Search by Name", "Website URL", "Manual Description", "Upload Document"))
|
| 53 |
|
| 54 |
+
progress_bar = st.progress(0)
|
| 55 |
+
|
| 56 |
if input_method == "Search by Name":
|
| 57 |
if st.button("Find Company Details"):
|
| 58 |
+
progress_bar.progress(10)
|
| 59 |
st.session_state.company_data = search_company(company_name)
|
| 60 |
+
progress_bar.progress(30)
|
| 61 |
+
st.rerun()
|
| 62 |
elif input_method == "Website URL":
|
| 63 |
website_url = st.text_input("Enter Website URL")
|
| 64 |
if st.button("Scrape Website"):
|
| 65 |
+
progress_bar.progress(10)
|
| 66 |
st.session_state.company_data = scrape_website(website_url)
|
| 67 |
+
progress_bar.progress(30)
|
| 68 |
+
st.rerun()
|
| 69 |
elif input_method == "Manual Description":
|
| 70 |
company_data_input = st.text_area("Enter Company Description")
|
| 71 |
if st.button("Process Description"):
|
| 72 |
+
progress_bar.progress(10)
|
| 73 |
st.session_state.company_data = process_company_description(company_data_input)
|
| 74 |
+
progress_bar.progress(30)
|
| 75 |
+
st.rerun()
|
| 76 |
elif input_method == "Upload Document":
|
| 77 |
uploaded_file = st.file_uploader("Upload PDF or PPT", type=["pdf", "pptx"])
|
| 78 |
if uploaded_file is not None:
|
| 79 |
+
progress_bar.progress(10)
|
| 80 |
st.session_state.company_data = process_uploaded_document(uploaded_file)
|
| 81 |
+
progress_bar.progress(30)
|
| 82 |
+
st.rerun()
|
| 83 |
|
| 84 |
if st.session_state.company_data:
|
| 85 |
st.subheader("Extracted Company Information")
|
| 86 |
st.write(st.session_state.company_data)
|
| 87 |
+
progress_bar.progress(50)
|
| 88 |
|
| 89 |
industry = st.text_input("Industry Type (e.g., Healthcare, Finance)")
|
| 90 |
if st.button("Analyze Industry Trends"):
|
| 91 |
+
progress_bar.progress(60)
|
| 92 |
st.session_state.industry_trends = get_industry_trends(industry)
|
| 93 |
+
progress_bar.progress(70)
|
| 94 |
+
st.rerun()
|
| 95 |
|
| 96 |
if st.session_state.industry_trends:
|
| 97 |
st.subheader("Industry Trends")
|
| 98 |
st.write(st.session_state.industry_trends)
|
| 99 |
|
| 100 |
if st.button("Find AI Use Cases"):
|
| 101 |
+
progress_bar.progress(75)
|
| 102 |
st.session_state.ai_use_cases = get_ai_use_cases(industry)
|
| 103 |
+
progress_bar.progress(80)
|
| 104 |
+
st.rerun()
|
| 105 |
|
| 106 |
if st.session_state.ai_use_cases:
|
| 107 |
st.subheader("AI Use Cases")
|
|
|
|
| 109 |
|
| 110 |
competitor = st.text_input("Enter Competitor Name")
|
| 111 |
if st.button("Analyze Competitor AI Strategies"):
|
| 112 |
+
progress_bar.progress(85)
|
| 113 |
st.session_state.competitor_analysis = get_competitor_ai_strategies(competitor)
|
| 114 |
+
progress_bar.progress(90)
|
| 115 |
+
st.rerun()
|
| 116 |
|
| 117 |
if st.session_state.competitor_analysis:
|
| 118 |
st.subheader("Competitor AI Strategies")
|
| 119 |
st.write(st.session_state.competitor_analysis)
|
| 120 |
|
| 121 |
if st.button("Generate AI Strategy"):
|
| 122 |
+
progress_bar.progress(95)
|
| 123 |
st.session_state.ai_strategy = generate_ai_strategy(
|
| 124 |
st.session_state.company_data, st.session_state.industry_trends,
|
| 125 |
st.session_state.ai_use_cases, st.session_state.competitor_analysis)
|
| 126 |
+
progress_bar.progress(100)
|
| 127 |
+
st.rerun()
|
| 128 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
st.markdown("---")
|
| 130 |
+
st.markdown("**Developed by [Aditya Ghadge](https://www.linkedin.com/in/aditya-ghadge-a82b30240/) for Giant Analytics**")
|
| 131 |
|
| 132 |
if __name__ == "__main__":
|
| 133 |
main()
|