Saturday, 24 May 2025

chat bot using python

 #chatbot

import nltk

import re


def chatbot():

    while True:

        user_input = input("User: ")

        user_input = user_input.lower()

        user_input = re.sub(r'[^\w\s]', '', user_input)

        tokens = nltk.word_tokenize(user_input)


        if 'hello' in tokens:

            print("Chatbot: Hi there!")

        elif 'bye' in tokens:

            print("Chatbot: Goodbye!")

            break

        else:

            print("Chatbot: Sorry, I didn't understand.")


chatbot()

Friday, 17 January 2025

Git Hub

 step1 : install git

step2 : install vscode

step3: login github

step4: open commandprompt  and type git

step5:

    git config --global user.name "jahabm"

    git config --global user.email "likejahab@gmail.com"

       (visual studio)

step 6 : open folder anyplace

step 7: open visual studio code and open the above folder

step 8 : open terminal (in visual studio)

           git clone https://github.com/Jahabm/test.git

step 9 : (open folder)

       PS C:\Users\G-TEC\Desktop\gtec> cd test

       PS C:\Users\G-TEC\Desktop\gtec\test>

step10 : create a new file(test2.txt)

step11 : open terminal (in visual studio)

                git status         (u)

                git add test2.txt 

                git status          (a)

                git commit -m "test2.txt added" 

                git push origin main

step12: git pull