Downloads · 30 days
0
BbbBobbby/John
John is a machine learning model from BbbBobbby. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Jun 5, 2023
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 69%
From the Hugging Face model README
from transformers import pipeline
chatbot = pipeline("conversational")
def chat_with_bot(): while True: user_input = input("User: ")
# Exit the loop if the user says 'bye'
if user_input.lower() == "bye":
print("Chatbot: Goodbye!")
break
# Generate a response from the chatbot
response = chatbot(user_input)[0]['generated_text']
print("Chatbot:", response)
print("Chatbot: Hello! How can I assist you?") chat_with_bot()