Spaces:
Runtime error
Runtime error
title: mtg-coloridentity | |
emoji: π§ | |
colorFrom: blue | |
colorTo: red | |
sdk: streamlit | |
sdk_version: 1.30.0 | |
app_file: app.py | |
pinned: true | |
license: mit | |
# mtg-coloridentity | |
[](https://opensource.org/licenses/MIT) | |
[](https://www.python.org) | |
[](https://github.com/joshuasundance-swca/mtg-coloridentity/actions/workflows/hf-space.yml) | |
[](https://huggingface.co/spaces/joshuasundance/mtg-coloridentity) | |
[](https://github.com/pre-commit/pre-commit) | |
[](https://github.com/charliermarsh/ruff) | |
[](http://mypy-lang.org/) | |
[](https://github.com/psf/black) | |
[](https://github.com/PyCQA/bandit) | |
# mtg-coloridentity | |
π€ This README was written by GPT-4. π€ | |
## Overview | |
This Streamlit app is designed for the multi-label classification of Magic: The Gathering (MTG) cards, | |
specifically focusing on their color identity. | |
It utilizes a pre-trained model hosted on Hugging Face, `joshuasundance/mtg-coloridentity-multilabel-classification`, | |
to predict the color identity of MTG cards based on their names and descriptions. | |
## Features | |
- Interactive UI: Users can input the name and text of any MTG card to get predictions on its color identity. | |
- Color Probabilities: The app displays the probability of each color identity (Black, Green, Red, Blue, White) for the given card. | |
- Random Card Selection: With a "Roll the Dice" feature, users can load the text of a random MTG card from the dataset. | |
## How It Works | |
The app fetches a pre-trained `SetFit` model from Hugging Face and uses it to | |
predict the color identities of MTG cards. | |
The model's predictions are displayed as a bar chart, | |
showing the probability of each color identity. | |
## Getting Started | |
To run this app locally, clone the repository and ensure you have the following prerequisites installed: | |
- Python 3.x | |
- `streamlit` | |
- `pandas` | |
- `seaborn` | |
- `matplotlib` | |
- `datasets` and `setfit` from Hugging Face | |
## Contributions, Support, and Contact | |
Contributions to this project are welcome! Please feel free to submit issues and pull requests. | |
For support, please raise an issue on GitHub or in the HuggingFace space. | |
## License | |
This project is under the [MIT License](LICENSE.md). | |
## Acknowledgments | |
Thanks to HuggingFace and `setfit`! | |
## TODO | |
- [ ] make a todo list ;) | |
- [ ] improve READMEs | |
- [ ] make better model(s) | |
- [x] learn in public | |