
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
streamlit-mnist-canvas
Advanced tools
A Streamlit component tailored for handwriting digit recognition using the MNIST dataset. This component allows users to draw digits on a canvas, facilitating integration with various machine learning models for digit recognition. It's ideal for educational, development, and testing purposes within Streamlit applications.
This repository provides a Streamlit component, st_mnist_canvas
, designed for creating and recognizing handwritten digits. It's a perfect tool for educational purposes, machine learning model testing, and demonstrations.
To install Streamlit Oekaki, run the following command:
pip install streamlit-mnist-canvas
st_mnist_canvas
enables users to draw digits in a Streamlit app. The digit can then be displayed and processed, making it highly effective for use with MNIST-trained digit recognition models.
Here's how to get started with st_mnist_canvas:
import streamlit as st
from streamlit_mnist_canvas import st_mnist_canvas
import numpy as np
st.subheader("Input")
result = st_mnist_canvas()
if result.is_submitted:
st.write("Output")
st.image(result.resized_grayscale_array, caption="Grayscale 28x28 Image")
# Prepare the image for ML model prediction
# image_for_prediction = np.expand_dims(result.resized_grayscale_array, axis=0)
# Predict digit using a machine learning model
# Example: prediction = model.predict(image_for_prediction)
# st.write("Predicted Digit:", prediction)
Integrating with Machine Learning Models
st_mnist_canvas
can be directly integrated with ML models, especially those trained on the MNIST dataset. Once a digit is drawn and submitted, the image data, formatted as a 28x28 grayscale array, is ready for input into a pre-trained model. This allows for real-time digit recognition and analysis within your Streamlit app.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Streamlit component tailored for handwriting digit recognition using the MNIST dataset. This component allows users to draw digits on a canvas, facilitating integration with various machine learning models for digit recognition. It's ideal for educational, development, and testing purposes within Streamlit applications.
We found that streamlit-mnist-canvas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.