An open API service indexing awesome lists of open source software.

https://github.com/mongodb-developer/tensorflow_demos


https://github.com/mongodb-developer/tensorflow_demos

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

# Movie Genre Classification using TensorFlow
TensorFlow Logo

This script demonstrates how to train a movie genre classification model using TensorFlow. The model classifies movies into three genres: Western, History, and Musical. Uses the sample_mflix movies collection in Atlas!

## Installation

1. Install Python (version 3.6 or above) if you haven't already.

2. Install TensorFlow using pip:

```
pip3 install tensorflow
```

3. Install the required additional modules:
```
pip3 install pymongo
```
## Usage

1. Make sure you have a MongoDB Atlas account set up. If not, sign up for free at [https://www.mongodb.com/cloud/atlas](https://www.mongodb.com/cloud/atlas).

2. Clone this repository to your local machine or download the files.

3. Open the `movies.py` script in a text editor.

4. Replace `` with your actual MongoDB Atlas connection string in the `client = pymongo.MongoClient('')` line.

5. Open a terminal or command prompt and navigate to the project directory.

6. Run the script using the following command:
```
python3 movies.py
```

This will start the training process and display the progress and accuracy.

7. Once the model is trained, it will be saved as `movie_genre_model.keras` in the current directory.

## Contributing

If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.

## License

This project is licensed under the MIT License. See the `LICENSE` file for more information.

For more information, you can refer to the following documentation:

- [TensorFlow Documentation](https://www.tensorflow.org/)
- [Keras Documentation](https://keras.io/)