https://github.com/mongodb-developer/tensorflow_demos
https://github.com/mongodb-developer/tensorflow_demos
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mongodb-developer/tensorflow_demos
- Owner: mongodb-developer
- License: apache-2.0
- Created: 2023-06-04T17:30:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T17:04:52.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T00:06:46.200Z (3 months ago)
- Language: Python
- Size: 49.8 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Movie Genre Classification using TensorFlow
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
```
## Usage1. 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/)