This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import accuracy_score, classification_report | |
# Load data | |
digits = datasets.load_digits() | |
trainX, testX, trainY, testY = train_test_split(digits.images, digits.target, test_size=0.2, random_state=42) | |
# mnist = datasets.fetch_openml('mnist_784', version=1, as_frame=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import flask | |
app = flask.Flask("CamApp") | |
def gen(): | |
cap = cv2.VideoCapture(0) | |
while True: | |
_, frame = cap.read() | |
yield (b'--frame\r\n' |
NewerOlder