Here’s a README file to help set up and run your Streamlit chatbot project.

---

# Chatbot Interface Project

This project is a chatbot interface built using Streamlit. Users can interact with the bot by typing questions, and the bot responds using the `answer` function from `utils.py`.

## Setup Instructions

To set up and run the project, follow the steps below. Instructions are provided for both Windows and other operating systems (Linux/macOS).

### 1. Clone the Repository

```bash
git clone <your-repo-url>
cd <your-repo-name>
```

### 2. Create a Virtual Environment

It’s recommended to create a virtual environment to keep dependencies isolated.

#### Windows
```bash
python -m venv venv
venv\Scripts\activate
```

#### Linux/macOS
```bash
python3 -m venv venv
source venv/bin/activate
```

### 3. Install Requirements

With your virtual environment activated, install the project dependencies from `requirements.txt`.

```bash
pip install -r requirements.txt
```

### 4. Run the Streamlit App

To start the Streamlit app, use the following command:

```bash
streamlit run app.py
```

### 5. Interact with the Chatbot

After running the command, a local web server will start, and a URL will be shown in the terminal (usually http://localhost:8501). Open this URL in a browser to interact with the chatbot.

---

## Project Structure

- `app.py`: The main Streamlit application code.
- `utils.py`: Contains the `answer` function used to generate responses.
- `requirements.txt`: Lists all required dependencies.

## Troubleshooting

1. **Streamlit Not Found**: Ensure your virtual environment is activated. Check by running `pip list` to confirm `streamlit` is installed.
2. **Virtual Environment Activation**: If there are issues activating the environment, refer to the [Python documentation](https://docs.python.org/3/library/venv.html) for your OS.

## Deactivating the Virtual Environment

When you’re done working on the project, deactivate the virtual environment by running:

```bash
deactivate
```

Enjoy interacting with your chatbot!
