From e33bd0eca1c1044397e70a746c05dacc4d27006e Mon Sep 17 00:00:00 2001 From: Aleksandar Tomasevic Date: Fri, 9 Aug 2024 14:16:47 +0200 Subject: [PATCH] Video detection problems Fixes #19 --- .gitignore | 3 +++ R/setup_modules.R | 6 +++--- inst/python/video.py | 7 +------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 46c64fb..ed695cb 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ rsconnect/ # Notes folder /notes/ + +# Playground folder +/playground/ \ No newline at end of file diff --git a/R/setup_modules.R b/R/setup_modules.R index 992a20c..f03ce2e 100644 --- a/R/setup_modules.R +++ b/R/setup_modules.R @@ -16,10 +16,10 @@ setup_modules <- function() # Set necessary modules modules <- c( "accelerate==0.29.3", "llama-index==0.10.30", "nltk==3.8.1", - "opencv-python", "pandas==2.1.3", "pypdf==4.0.1", - "pytube==15.0.0", "pytz==2024.1", "qdrant-client==1.8.2", + "opencv-python", "pandas==2.1.3", "pypdf==4.0.1", "pytz==2024.1", "qdrant-client==1.8.2", "sentencepiece==0.2.0", "sentence-transformers==2.7.0", - "tensorflow==2.14.1", "torch==2.1.1", "transformers==4.35.0" + "tensorflow==2.14.1", "torch==2.1.1", "transformers==4.35.0", + "pytubefix==6.9.2" ) # Determine whether any modules need to be installed diff --git a/inst/python/video.py b/inst/python/video.py index 666e61f..85c9547 100644 --- a/inst/python/video.py +++ b/inst/python/video.py @@ -4,14 +4,9 @@ import cv2 import numpy as np import pandas as pd -from pytube import YouTube +from pytubefix import YouTube #19 Fixed pytube issue from transformers import AutoProcessor, AutoModel -# import torch -# from torch import nn -# import torchvision.models as models -# from torchvision import transforms import torch.nn.functional as F -# from PIL import Image import time