Developed for a Hackathon: AI Capability and Risk Demos organised by Safe AI London and Apart Research, VerifyStream is an AI-powered application that helps users verify the content of YouTube videos and demonstrates the dual nature of AI in combating and potentially creating misinformation.
Click here to try the app (Please be noted that YouTube asks for sign in while trying the app directly from Streamlit cloud. It is advisable to try it locally. More information on how to try it locally is shared below)
Click here to see the 90 second demo
- YouTube Video Verification: Input any YouTube URL to analyze its content.
- AI-Powered Analysis: Utilizes advanced AI models to transcribe and analyze video content.
- Fact-Checking: Generates smart prompts and performs Google searches to verify claims.
- Verdict Generation: Provides a concise verdict on the truthfulness of the video content.
- Fake News Generation: Demonstrates how AI can be used to create convincing misinformation.
- Audio Extraction: Downloads audio from the provided YouTube URL.
- Transcription: Uses the Whisper model to transcribe the audio content.
- Content Analysis: Employs GPT models to describe the video content and generate fact-checking prompts.
- Web Scraping: Performs Google searches based on the generated prompts and extracts relevant information.
- Verification: Analyzes the scraped data to provide a final verdict on the video's claims.
- Fake News Generation: Creates an opposite narrative and generates fake news content to demonstrate AI's potential misuse.
- Frontend: Streamlit
- AI Models:
- OpenAI's GPT models for text generation and analysis
- Whisper for speech-to-text conversion
- DALL-E for image generation
- Web Scraping: Google search API, Requests and BeautifulSoup
- Audio Processing: yt-dlp and librosa
-
Clone the repository
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your API keys in the Streamlit secrets manager:
- OpenAI API key (FOLLOW THIS LINK TO GET YOUR API)
- Google Custom Search API key (FOLLOW THIS LINK TO GET YOUR API)
- Google Search Engine ID (FOLLOW THIS LINK TO GET YOUR ID)
- (Create a "streamlit" folder in local repo and create "secrets.toml" file inside the streamlit folder. Add the API keys in below format)
-
Run the Streamlit app:
streamlit run main.py
This app is designed to demonstrate both the potential benefits and risks of AI technology in information verification. While it can be a powerful tool for fact-checking, it also showcases how AI can be used to generate misleading content. Users are encouraged to use this tool responsibly and critically evaluate all information, regardless of its source.
This application is for educational and demonstration purposes only. The fake news generation feature is included to raise awareness about AI's potential for misuse and should not be used to create or spread misinformation.
Contributions to improve VerifyStream are welcome. Please feel free to submit pull requests or open issues to discuss potential enhancements.