Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video blogifer #1033

Merged
merged 9 commits into from
Jan 22, 2025
Merged

Video blogifer #1033

merged 9 commits into from
Jan 22, 2025

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Jan 22, 2025

Add sample to process video


The GIT_DIFF shows several new scripts and functionalities being added to generate YouTube video titles and descriptions based on transcriptions of videos. These new features include:

  • A script for generating a YouTube transcript using speech-to-text models.
  • A script for extracting screenshot images from video segments based on the transcript.
  • A script for prompting and summarizing key moments in videos, along with hashtags.

AI-generated content by pr-describe may be incorrect

@@ -1,5 +1,5 @@
---
title: Videos
title: Videos as Inputs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title has been changed from "Videos" to "Videos as Inputs". Ensure that this change aligns with the content and does not mislead readers.

AI-generated content by pr-docs-review-commit title_change may be incorrect

Copy link

LGTM 🚀

Changes look sound and are well-integrated. There are no noticeable functional issues. Here's a brief summary of the updates:

  1. image.tsx:
    • Added sliceTail, sliceHead, and sliceSample options to DefImagesOptions
    • The types and defaults should be validated before using in production.
    --- a/packages/core/src/types/prompt_template.d.ts
    +++ b/packages/core/src/types/prompt_template.d.ts
     interface DefImagesOptions {
       flip?: { horizontal?: boolean; vertical?: boolean }
  • sliceHead?: number
    
  • sliceTail?: number
    
  • sliceSample?: number
    
    }
    +interface ArrayFilter {
  1. tidy.tsx:
    • Changed sliceData parameters from any[] and DataFilter to any[] and ArrayFilter
    --- a/packages/core/src/tidy.tsx
    +++ b/packages/core/src/tidy.tsx
     export function sliceData(rows: any[], options: DataFilter = {}) {
       if (!rows) return rows
    
  • // Check if a random sample of rows is to be sliced and apply sampling
    
  • ```
    
  1. runpromptcontext.tsx:
    • Added sliceData calls when processing files and arrays.
    --- a/packages/core/src/runpromptcontext.tsx
    +++ b/packages/core/src/runpromptcontext.tsx
     export function createChatTurnGenerationContext(
       options: GenerationOptions,
       defImages: DefImagesFunction
  • ) => {
  • ) {
    const { detail } = defOptions || {}
  • if (Array.isArray(files))
    
  •     files.forEach((file) => defImages(file, defOptions))
    
  • else if (
    
  • if (Array.isArray(files)) {
    
  •     const sliced = sliceData(files, defOptions)
    
  •     sliced.forEach((file) => defImages(file, defOptions))
    
  • } else if (
        typeof files === "string" ||
        files instanceof Blob ||
        files instanceof Buffer
    
    
    

The changes look well-structured and maintainable. LGTM 🚀

AI-generated content by pr-review may be incorrect

@pelikhan pelikhan merged commit 3d35882 into main Jan 22, 2025
14 checks passed
@pelikhan pelikhan deleted the video-blogifer branch January 22, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant