Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ st.header("Generate a video script by specifying a topic, length, and creativity
|
|
11 |
|
12 |
# Sidebar to capture API key
|
13 |
st.sidebar.title("API Configuration")
|
14 |
-
st.sidebar.text_input("Enter your
|
15 |
|
16 |
# Main input fields for the video script
|
17 |
prompt = st.text_input("Provide the topic of the video:")
|
@@ -25,7 +25,7 @@ generate_script_button = st.button("Generate Script")
|
|
25 |
if generate_script_button:
|
26 |
api_key = st.session_state.api_key
|
27 |
if not api_key:
|
28 |
-
st.error("Please provide a valid
|
29 |
else:
|
30 |
# Generate the script using the utility function
|
31 |
title, script, search_data = generate_script(prompt, video_length, creativity, api_key)
|
|
|
11 |
|
12 |
# Sidebar to capture API key
|
13 |
st.sidebar.title("API Configuration")
|
14 |
+
st.sidebar.text_input("Enter your Gemini API key:", type="password", key="api_key")
|
15 |
|
16 |
# Main input fields for the video script
|
17 |
prompt = st.text_input("Provide the topic of the video:")
|
|
|
25 |
if generate_script_button:
|
26 |
api_key = st.session_state.api_key
|
27 |
if not api_key:
|
28 |
+
st.error("Please provide a valid Gemini API key.")
|
29 |
else:
|
30 |
# Generate the script using the utility function
|
31 |
title, script, search_data = generate_script(prompt, video_length, creativity, api_key)
|