Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import zipfile
|
|
4 |
import io
|
5 |
import time
|
6 |
import textwrap
|
7 |
-
import
|
8 |
from agents import TopicAgent, ContentAgent, SlideAgent, CodeAgent, DesignAgent, VoiceoverAgent
|
9 |
|
10 |
# Initialize agents
|
@@ -147,10 +147,12 @@ with st.sidebar:
|
|
147 |
voices = voiceover_agent.get_voices()
|
148 |
|
149 |
if voices:
|
|
|
150 |
selected_voice = st.selectbox(
|
151 |
"Choose a voice:",
|
152 |
options=[v['voice_id'] for v in voices],
|
153 |
format_func=lambda id: next((v['name'] for v in voices if v['voice_id'] == id), "Default")
|
|
|
154 |
st.session_state.selected_voice = selected_voice
|
155 |
elif voiceover_agent.api_key:
|
156 |
st.warning("Couldn't load voices. Using default voice.")
|
|
|
4 |
import io
|
5 |
import time
|
6 |
import textwrap
|
7 |
+
import requests
|
8 |
from agents import TopicAgent, ContentAgent, SlideAgent, CodeAgent, DesignAgent, VoiceoverAgent
|
9 |
|
10 |
# Initialize agents
|
|
|
147 |
voices = voiceover_agent.get_voices()
|
148 |
|
149 |
if voices:
|
150 |
+
# Fixed selectbox syntax
|
151 |
selected_voice = st.selectbox(
|
152 |
"Choose a voice:",
|
153 |
options=[v['voice_id'] for v in voices],
|
154 |
format_func=lambda id: next((v['name'] for v in voices if v['voice_id'] == id), "Default")
|
155 |
+
)
|
156 |
st.session_state.selected_voice = selected_voice
|
157 |
elif voiceover_agent.api_key:
|
158 |
st.warning("Couldn't load voices. Using default voice.")
|