Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,24 @@
|
|
| 1 |
-
# File: app.py
|
| 2 |
import streamlit as st
|
| 3 |
import json
|
| 4 |
import zipfile
|
| 5 |
import io
|
| 6 |
import time
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Initialize agents
|
| 10 |
-
topic_agent = TopicAgent()
|
| 11 |
-
content_agent = ContentAgent()
|
| 12 |
slide_agent = SlideAgent()
|
| 13 |
code_agent = CodeAgent()
|
| 14 |
|
|
@@ -25,7 +35,6 @@ with st.sidebar:
|
|
| 25 |
duration = st.slider("Duration (hours)", 1.0, 8.0, 2.0)
|
| 26 |
difficulty = st.selectbox("Difficulty", ["Beginner", "Intermediate", "Advanced"])
|
| 27 |
include_code = st.checkbox("Include Code Labs", True)
|
| 28 |
-
include_voiceover = st.checkbox("Include Voiceovers", False)
|
| 29 |
|
| 30 |
if st.button("✨ Generate Workshop", type="primary"):
|
| 31 |
with st.spinner("Creating your workshop materials..."):
|
|
@@ -82,4 +91,10 @@ if "outline" in st.session_state:
|
|
| 82 |
st.divider()
|
| 83 |
st.subheader("Ready to deliver this workshop?")
|
| 84 |
st.write("**$10K per corporate engagement | $1K refundable pilot deposit**")
|
| 85 |
-
st.link_button("🚀 Book Pilot Workshop", "https://calendly.com/your-link")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import json
|
| 3 |
import zipfile
|
| 4 |
import io
|
| 5 |
import time
|
| 6 |
+
import os
|
| 7 |
+
import openai
|
| 8 |
+
from dotenv import load_dotenv
|
| 9 |
+
|
| 10 |
+
# Load environment variables
|
| 11 |
+
load_dotenv()
|
| 12 |
+
|
| 13 |
+
# Import agents directly
|
| 14 |
+
from topic_agent import TopicAgent
|
| 15 |
+
from content_agent import ContentAgent
|
| 16 |
+
from slide_agent import SlideAgent
|
| 17 |
+
from code_agent import CodeAgent
|
| 18 |
|
| 19 |
# Initialize agents
|
| 20 |
+
topic_agent = TopicAgent(os.getenv("OPENAI_API_KEY"))
|
| 21 |
+
content_agent = ContentAgent(os.getenv("OPENAI_API_KEY"))
|
| 22 |
slide_agent = SlideAgent()
|
| 23 |
code_agent = CodeAgent()
|
| 24 |
|
|
|
|
| 35 |
duration = st.slider("Duration (hours)", 1.0, 8.0, 2.0)
|
| 36 |
difficulty = st.selectbox("Difficulty", ["Beginner", "Intermediate", "Advanced"])
|
| 37 |
include_code = st.checkbox("Include Code Labs", True)
|
|
|
|
| 38 |
|
| 39 |
if st.button("✨ Generate Workshop", type="primary"):
|
| 40 |
with st.spinner("Creating your workshop materials..."):
|
|
|
|
| 91 |
st.divider()
|
| 92 |
st.subheader("Ready to deliver this workshop?")
|
| 93 |
st.write("**$10K per corporate engagement | $1K refundable pilot deposit**")
|
| 94 |
+
st.link_button("🚀 Book Pilot Workshop", "https://calendly.com/your-link")
|
| 95 |
+
|
| 96 |
+
# Debug: Show API status
|
| 97 |
+
if os.getenv("OPENAI_API_KEY"):
|
| 98 |
+
st.sidebar.success("OpenAI API connected")
|
| 99 |
+
else:
|
| 100 |
+
st.sidebar.warning("OpenAI API not set - using mock data")
|