Scope tkinter and streamlit in Solutions tests (#14426)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-07-15 02:16:23 +02:00 committed by GitHub
parent c67a3039c1
commit e094f9c371
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 19 deletions

View file

@ -6,13 +6,13 @@ import time
import cv2
import torch
from ultralytics.utils.checks import check_requirements
from ultralytics.utils.downloads import GITHUB_ASSETS_STEMS
def inference():
"""Runs real-time object detection on video input using Ultralytics YOLOv8 in a Streamlit application."""
# Scope imports for faster ultralytics package load speeds
check_requirements("streamlit>=1.29.0") # scope imports for faster ultralytics package load speeds
import streamlit as st
from ultralytics import YOLO