Spaces:
Runtime error
Runtime error
import streamlit as st | |
from utils.levels import complete_level, initialize_level, render_page, get_level | |
from utils.login import initialize_login | |
initialize_login() | |
initialize_level() | |
LEVEL = 0 | |
import cv2 | |
def intro_page(): | |
st.title("Webcam Live Feed") | |
run = st.checkbox('Run') | |
FRAME_WINDOW = st.image([]) | |
camera = cv2.VideoCapture(0) | |
while run: | |
_, frame = camera.read() | |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) | |
FRAME_WINDOW.image(frame) | |
else: | |
st.write('Stopped') | |
# st.header("Face Recognition") | |
# st.subheader("Introduction") | |
# st.write( | |
# """ | |
# Welcome to the interactive tutorial on creating your very own Face Recognition Application! | |
# """ | |
# ) | |
# | |
# st.image( | |
# "https://static.wixstatic.com/media/abb909_35aa4b27e4b840659a20fd69f0a18354~mv2.gif", | |
# use_column_width=True, | |
# ) | |
# | |
# st.write( | |
# """ | |
# In this tutorial, you will learn how to build a simple application that can detect and recognise faces from a given photo. Face recognition has revolutionized | |
# various industries, including security, entertainment, and personal identification. Are you ready to dive into the exciting world of face recognition? | |
# """ | |
# ) | |
# | |
# st.info(f"Click on the button below to start the tutorial!") | |
# | |
# if st.button("I am Ready!"): | |
# complete_level(LEVEL) | |
render_page(intro_page, LEVEL) | |