Skip to content

Sierra the Songbot is a sophisticated chatbot designed to provide music recommendations and information. Built using advanced natural language processing and machine learning techniques, Sierra interacts with users to understand their musical preferences and suggest songs, albums, and artists accordingly.

Notifications You must be signed in to change notification settings

Mr1n8L/Sierra-The_Songbot

Repository files navigation

Chatbot Project

This project is a Python-based chatbot that uses various dependencies, including some that may require Rust for building. This README provides step-by-step instructions on how to set up the project, build the Docker image, and run the application.

Table of Contents

  1. Prerequisites
  2. Project Structure
  3. Docker Setup
  4. Handling Rust Dependency
  5. Running the Application
  6. Troubleshooting
  7. License

Prerequisites

Before you begin, ensure you have the following installed on your local machine:

Project Structure

The project structure should look something like this:

├── Dockerfile
├── requirements.txt
├── chatbot_training.py
├── chat.py
└── README.md

Docker Setup

Dockerfile

The Dockerfile is used to create a Docker image for the chatbot application. It installs all necessary dependencies, including Rust and Cargo, which are required for some Python packages.

# Use an official Python runtime as a base image
FROM python:3.10-slim

# Install Rust and Cargo
RUN apt-get update && apt-get install -y curl \
    && curl https://sh.rustup.rs -sSf | sh -s -- -y \
    && source $HOME/.cargo/env

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file into the container
COPY requirements.txt .

# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt

# Copy the rest of the application code into the container
COPY . .

# Expose the application port
EXPOSE 8000

# Define the command to run your application
CMD ["python", "chatbot_training.py"]

Building the Docker Image

To build the Docker image, navigate to the project directory in your terminal and run the following command:

docker build -t chatbot:latest .

Running the Docker Container

After building the image, you can run the Docker container using:

docker run -p 8000:8000 chatbot:latest

This command will start the application and map port 8000 from the container to port 8000 on your host machine.

Handling Rust Dependency

Some Python packages in this project require Rust and Cargo to compile. The Dockerfile includes steps to install Rust and Cargo to handle these dependencies. If you encounter errors related to Rust during the build process, ensure that Rust is properly installed and available in the PATH.

Running the Application

The application can be run in two separate terminals:

  1. Terminal 1: Run the chatbot training script.

    python chatbot_training.py

    This script preprocesses the data, trains the model, and saves the necessary objects.

  2. Terminal 2: Run the chat interface.

    python chat.py

    This script starts the chat interface where you can interact with the trained chatbot.

Troubleshooting

Rust and Cargo Issues

If you encounter issues related to Rust or Cargo not being installed:

  • Ensure that Rust is installed on your system or in your Docker environment.
  • Rebuild the Docker image after making sure Rust is available.

Dependency Version Conflicts

If you experience dependency version conflicts, consider updating your requirements.txt to compatible versions or consult the documentation for the specific package.

Updating pip

If you see notices about an outdated version of pip, you can update it by adding this line to your Dockerfile before the pip install command:

RUN python -m pip install --upgrade pip

About

Sierra the Songbot is a sophisticated chatbot designed to provide music recommendations and information. Built using advanced natural language processing and machine learning techniques, Sierra interacts with users to understand their musical preferences and suggest songs, albums, and artists accordingly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •