Skip to main content

Posts

Showing posts from 2024

OpenAI Learning:- Chapter 6

  Using Generative AI for Audio/Video Processing: Power of Summarization What Is the Purpose of This Application ? This application is for audio and video summarization. For users who wish to quickly create bullet point summaries of audio/video content, it is a useful tool. Sample code: from langchain.document_loaders import youtube from langchain.text_splitter import RecursiveCharacterTextSplitter import openai import streamlit as st openai.api_key = "<<Add your key here>>" st.set_page_config(page_title= "YouTube Audio/Video Summariser App" ) st.markdown( """<p style="color: #3fd100;font-size: 30px;font-family: sans-serif; text-align:center;margin-bottom:0px;"><b>YouTube Audio/Video </b><span style="color: #3fd100;font-size: 30px;font-family: sans-serif;"><b>Summariser App</b></span></p><p></p>""" , unsafe_allow_html= True ) st.head

OpenAI Learning:- Chapter 5

  Generative AI-Powered Audio/Video Processing: Whisper's Python Adventure What Is the Purpose of This Application? An application that displays the ability of Generative AI to process and analyze audio/video files, and then output the lyrics for that audio or video file. Sample code: import streamlit as st from pytube import YouTube import os import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline def get_mp3(url):     yt = YouTube(str(url))     audio = yt.streams.filter(only_audio = True ).first()     destination = '.'     out_file = audio.download(output_path=destination)     base, ext = os.path.splitext(out_file)     new_file = base + '.mp3'     os.rename(out_file, new_file)     return new_file def get_transcript(audio_file):     device = "cuda:0" if torch.cuda.is_available() else "cpu"   #If you have GPU else it will use cpu     torch_dtype = torch.float16 if torch.cuda.is_available() els

Implementing Open AI in Software Testing: Creating a Model for Test Case Review/Optimization

This article shows how QA teams and developers may create AI assistants by integrating OpenAI's cutting-edge AI technologies. In this instance, we are setting up the OpenAI package using our specific API key. This key is essential because it provides us with access to the OpenAI platform and allows us to take advantage of all its features. Steps to Build the Model and Web App: Pre-requisite: Ø   Go through this:  https://platform.openai.com/docs/quickstart?context=python Ø   Install Python and other dependencies like streamlit, openAI, etc. on your machine using the PIP package installer if you are planning to run it on your local. Ø   Create an Open API account, and generate API key using  https://platform.openai.com/api-keys  (Note* You receive free $5 when signing up using your mobile phone, which is sufficient for you to play with.) Step 1: Create a GitHub Account and Create a New Repository 1.       Go to  GitHub’s website . 2.      Click on the “Sign up” button in the top-rig

Implementing Open AI in Software Testing: Creating a Text Generation Model for Test Case Creation

  Software testing can be revolutionized by using Artificial Intelligence (AI), which can significantly increase efficacy and efficiency. Our use case focuses on software application test case generation. The manual and labor-intensive procedure can be greatly reduced by using a Text Generation Model to automatically create test scenarios based on requirements or user stories. This article creates a Text Generation Model using OpenAI's text generation model, namely GPT-3.5-turbo.   Steps to Build the Model and Web App: Pre-requisite: Ø Go through this: https://platform.openai.com/docs/quickstart?context=python Ø Install Python and other dependencies like streamlit, openAI, etc. on your machine using the PIP package installer if you are planning to run it on your local. Ø Create an Open API account, and generate API key using https://platform.openai.com/api-keys (Note* You receive free $5 when signing up using your mobile phone, which is sufficient for you to play w