How To

,

Live Streaming & Broadcasting

How to Add AI to Your Youtube Live Stream Chat for Free

Share:

How to Add AI to Your Youtube Live Stream Chat for Free

Are you looking to supercharge your live stream chat with AI, engage your audience, and answer their questions in real time? With Python, Flask, StreamerBot and Hugging Face, you can build an intelligent chatbot to handle your chat interactions—all for free! This guide will show you how to set it up on a Windows PC.

Download and Install Python

Download the Python Installer exe from <<Here>> and Install it !

( I removed that Chocolatey wali steps because waha python error aaraha tha, aise install karoge tou koi problem nahi aaegi )

Open Command Prompt or PowerShell as Administrator.

Verify the installation:

python --version

pip --version

Steps to Install Flask and huggingface_hub After Python Installation:

Open Command Prompt or PowerShell.

Use pip to install the required packages:

pip install flask huggingface-hub

Verify the installations:

pip show flask

pip show huggingface-hub

Signup and Create New Access Token

Visit : https://huggingface.co/

Signup –

Create New Access Token –

Give permission ( Make calls to the serverless Inference API )

Download the Flask Application File

Download the main.py file from <<Here>>

Open the file in Notepad –

Add your Access Token and Save it –

Run The Application:

Open command prompt in same folder where the main.py file is and run this command 

Python main.py

Verify The Application is Running or Not

Open your Browser and visit http://localhost:11223/

If it shows “hello chat”, it means your application is running properly.

You can also add your query after this url to check AI response

Example: http://localhost:11223/what is the capital of India?

                   The capital of India is New Delhi.

Watch This Tutorial Video To Connect this AI with your Live Stream Chat using StreamerBot

Share: