import streamlit as st import requests import json import os # Define the API endpoints API_BASE_URL = os.environ.get("MY_SECRET_KEY") # Adjust this if your API is hosted elsewhere EVALUATE_ENDPOINT = f"{API_BASE_URL}/api/evaluate_pitch_deck" st.title("Pitch Deck Analyzer") # File uploader uploaded_file = st.file_uploader("Upload your pitch deck (PDF)", type="pdf") if uploaded_file is not None: # Evaluate pitch deck st.header("Pitch Deck Evaluation") # Investor criteria inputs #industry_focus = st.text_input("Industry Focus") industry_focus = st.selectbox("industry_focus", ["Technology","Healthcare","Consumer Goods","Energy & Sustainability","Financial Services","Media & Entertainment","Real Estate & PropTech","Agriculture & FoodTech","Transportation & Logistics", "Education & EdTech", "Telecommunications", "Manufacturing & Industrial Tech", "Automotive & Mobility", "Cleantech & Environmental Tech", "Space & Aerospace"]) investment_stage = st.selectbox("Investment Stage", ["Seed", "Series A", "Series B", "Growth", "Late Stage"]) #geographical_focus = st.text_input("Geographical Focus") geographical_focus = st.selectbox("geographical_focus ", ["North America", "Europe", "Asia", "Latin America", "Middle East", "Africa", "Australia & Oceania", "Global/International"]) risk_appetite = st.selectbox("Risk Appetite", ["Low", "Medium", "High"]) if st.button("Evaluate Pitch Deck"): with st.spinner("Evaluating pitch deck..."): files = {"pitch_file": ("pitch_deck.pdf", uploaded_file.getvalue(), "application/pdf")} data = { "industry_focus": industry_focus, "investment_stage": investment_stage, "geographical_focus": geographical_focus, "risk_appetite": risk_appetite } response = requests.post(EVALUATE_ENDPOINT, files=files, data=data) if response.status_code == 200: result = response.json() st.subheader("Summary") st.write(result["summary"]) else: st.error(f"Error: {response.status_code} - {response.text}") else: st.info("Please upload a pitch deck to get started.")