stevafernandes commited on
Commit
e1cf671
·
verified ·
1 Parent(s): b389a39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -9,9 +9,6 @@ from pathlib import Path
9
  # --- Get API key from environment variable or user input ---
10
  def get_api_key():
11
  GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY", "")
12
- if not GOOGLE_API_KEY:
13
- GOOGLE_API_KEY = st.text_input("Enter your Gemini API key", type="password")
14
- return GOOGLE_API_KEY or "AIzaSyA8TTu9s6fJDG9RlMwOyHFxg270xLgpiyE" # Warning: Hardcoded key
15
 
16
  # VideoProcessor class
17
  class VideoProcessor:
@@ -62,7 +59,6 @@ def main():
62
  st.markdown("---")
63
 
64
  # Step 1: API Key input
65
- #st.subheader("Step 1: Enter your Gemini API key")
66
  api_key = get_api_key()
67
 
68
  if not api_key:
@@ -70,7 +66,7 @@ def main():
70
  st.stop()
71
 
72
  # Step 2: Upload Video
73
- st.subheader("Upload your video file")
74
  uploaded_file = st.file_uploader("Upload a video", type=['mp4', 'mov', 'avi', 'mkv', 'webm'])
75
 
76
  if uploaded_file:
@@ -153,7 +149,7 @@ def main():
153
  st.rerun()
154
 
155
  # Step 3: Chat about Video
156
- st.subheader("Chat with your video")
157
 
158
  if st.session_state.video_file:
159
  # Display chat history
 
9
  # --- Get API key from environment variable or user input ---
10
  def get_api_key():
11
  GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY", "")
 
 
 
12
 
13
  # VideoProcessor class
14
  class VideoProcessor:
 
59
  st.markdown("---")
60
 
61
  # Step 1: API Key input
 
62
  api_key = get_api_key()
63
 
64
  if not api_key:
 
66
  st.stop()
67
 
68
  # Step 2: Upload Video
69
+ st.subheader("Step 1: Upload your video file")
70
  uploaded_file = st.file_uploader("Upload a video", type=['mp4', 'mov', 'avi', 'mkv', 'webm'])
71
 
72
  if uploaded_file:
 
149
  st.rerun()
150
 
151
  # Step 3: Chat about Video
152
+ st.subheader("Step 2: Chat with your video")
153
 
154
  if st.session_state.video_file:
155
  # Display chat history