Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from user_input import get_user_input
|
| 3 |
+
from ai_processing import generate_company_profile, calculate_fundraising_score, generate_recommendations
|
| 4 |
+
from visualization import create_comparison_chart
|
| 5 |
+
|
| 6 |
+
def main():
|
| 7 |
+
st.set_page_config(page_title="BandAI - AI-Powered Fundraising Advisor", layout="wide")
|
| 8 |
+
st.title("BandAI - AI-Powered Fundraising Advisor")
|
| 9 |
+
|
| 10 |
+
# Get user input
|
| 11 |
+
user_data = get_user_input()
|
| 12 |
+
|
| 13 |
+
if st.button("Analyze"):
|
| 14 |
+
with st.spinner("Analyzing your startup..."):
|
| 15 |
+
# Generate company profile
|
| 16 |
+
company_profile = generate_company_profile(user_data)
|
| 17 |
+
st.subheader("AI-Generated Company Profile")
|
| 18 |
+
st.write(company_profile)
|
| 19 |
+
|
| 20 |
+
# Calculate fundraising score
|
| 21 |
+
fundraising_score = calculate_fundraising_score(user_data)
|
| 22 |
+
st.subheader("Fundraising Probability Score")
|
| 23 |
+
st.progress(fundraising_score / 100)
|
| 24 |
+
st.write(f"{fundraising_score}%")
|
| 25 |
+
|
| 26 |
+
# Generate recommendations
|
| 27 |
+
recommendations = generate_recommendations(user_data)
|
| 28 |
+
st.subheader("Suggestions for Improving Fundraising Success")
|
| 29 |
+
for i, rec in enumerate(recommendations, 1):
|
| 30 |
+
st.write(f"{i}. {rec}")
|
| 31 |
+
|
| 32 |
+
# Create comparison visualization
|
| 33 |
+
comparison_chart = create_comparison_chart(user_data)
|
| 34 |
+
st.subheader("Company Comparison")
|
| 35 |
+
st.plotly_chart(comparison_chart)
|
| 36 |
+
|
| 37 |
+
if __name__ == "__main__":
|
| 38 |
+
main()
|