Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,21 @@ import tempfile
|
|
15 |
# Load environment variables from .env.local
|
16 |
load_dotenv('.env.local')
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
## 1. Turn video into frames
|
19 |
def video_to_frames(video_file):
|
20 |
# Save the uploaded video file to a temporary file
|
|
|
15 |
# Load environment variables from .env.local
|
16 |
load_dotenv('.env.local')
|
17 |
|
18 |
+
# Add a function to check the password
|
19 |
+
def check_password():
|
20 |
+
correct_password = os.getenv('PASSWORD')
|
21 |
+
if correct_password is None:
|
22 |
+
st.error("Password is not set in .env.local")
|
23 |
+
return False
|
24 |
+
|
25 |
+
user_password = st.text_input("Enter the password to proceed", type="password")
|
26 |
+
if user_password == correct_password:
|
27 |
+
return True
|
28 |
+
else:
|
29 |
+
if st.button("Check Password"):
|
30 |
+
st.error("Incorrect password")
|
31 |
+
return False
|
32 |
+
|
33 |
## 1. Turn video into frames
|
34 |
def video_to_frames(video_file):
|
35 |
# Save the uploaded video file to a temporary file
|