cryogenic22 commited on
Commit
e0f14d7
·
verified ·
1 Parent(s): ac46df8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -51
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
  import uuid
 
3
  from components import (
4
  render_ideation_stage,
5
  render_storyboard_stage,
@@ -8,6 +9,11 @@ from components import (
8
  render_export_stage
9
  )
10
 
 
 
 
 
 
11
  # Set page config - must be the first Streamlit command
12
  st.set_page_config(
13
  page_title="AI PowerPoint Creator",
@@ -68,54 +74,4 @@ if "target_audience" not in st.session_state:
68
  if "storyboard" not in st.session_state:
69
  st.session_state.storyboard = []
70
  if "selected_template" not in st.session_state:
71
- st.session_state.selected_template = "professional"
72
- if "slides_content" not in st.session_state:
73
- st.session_state.slides_content = []
74
-
75
- # Sidebar
76
- with st.sidebar:
77
- st.image("https://via.placeholder.com/150x80.png?text=PowerPoint+AI", width=150)
78
- st.title("AI PowerPoint Creator")
79
-
80
- # Display current progress
81
- st.write("## Progress")
82
- stages = ["Ideation", "Storyboard", "Template", "Slides", "Export"]
83
- current_stage_idx = stages.index(st.session_state.current_stage.title()) if st.session_state.current_stage.title() in stages else 0
84
- progress_value = (current_stage_idx) / (len(stages) - 1)
85
- st.progress(progress_value)
86
-
87
- # Display all stages and highlight current
88
- for i, stage in enumerate(stages):
89
- if i == current_stage_idx:
90
- st.markdown(f"### ▶️ {stage}")
91
- else:
92
- st.markdown(f"### ○ {stage}")
93
-
94
- st.write("---")
95
- st.write("Made with ❤️ and Claude AI")
96
-
97
- # Jump to stage buttons (for development/testing)
98
- if st.checkbox("Development Mode", value=False):
99
- st.write("Jump to stage:")
100
- col1, col2 = st.columns(2)
101
- for i, stage in enumerate(stages):
102
- with col1 if i % 2 == 0 else col2:
103
- if st.button(stage, key=f"jump_{stage}"):
104
- st.session_state.current_stage = stage.lower()
105
- st.rerun()
106
-
107
- # Main content
108
- st.title("AI PowerPoint Creator")
109
- st.write("Create professional presentations with AI-powered storyboarding and content generation")
110
-
111
- # Display different UI based on current stage
112
- if st.session_state.current_stage == "ideation":
113
- render_ideation_stage()
114
- elif st.session_state.current_stage == "storyboard":
115
- render_storyboard_stage()
116
- elif st.session_state.current_stage == "template":
117
- render_template_stage()
118
- elif st.session_state.current_stage == "slides":
119
- render_slides_stage()
120
- elif st.session_state.current_stage == "export":
121
- render_export_stage()
 
1
  import streamlit as st
2
  import uuid
3
+ import os
4
  from components import (
5
  render_ideation_stage,
6
  render_storyboard_stage,
 
9
  render_export_stage
10
  )
11
 
12
+ # Check and display API key status
13
+ api_key = os.getenv("ANTHROPIC_API_KEY")
14
+ if not api_key:
15
+ st.error("⚠️ ANTHROPIC_API_KEY environment variable not found. The app will use fallback content generation.")
16
+
17
  # Set page config - must be the first Streamlit command
18
  st.set_page_config(
19
  page_title="AI PowerPoint Creator",
 
74
  if "storyboard" not in st.session_state:
75
  st.session_state.storyboard = []
76
  if "selected_template" not in st.session_state:
77
+ st.session