Instructions to use Ahmed766/text-classification-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ahmed766/text-classification-demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ahmed766/text-classification-demo")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Ahmed766/text-classification-demo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download setup.py from Ahmed766/text-classification-demo: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/Ahmed766/text-classification-demo/resolve/main/setup.py
- Command line
-
hf download hf://Ahmed766/text-classification-demo/setup.py
-
curl -L -o setup.py https://huggingface.co/Ahmed766/text-classification-demo/resolve/main/setup.py
1.15 kB
| from setuptools import setup, find_packages | |
| with open("README.md", "r", encoding="utf-8") as fh: | |
| long_description = fh.read() | |
| setup( | |
| name="text-classification-model", | |
| version="0.1.0", | |
| author="Ahmed766", | |
| author_email="author@example.com", | |
| description="A text classification model for sentiment analysis", | |
| long_description=long_description, | |
| long_description_content_type="text/markdown", | |
| url="https://github.com/Ahmed766/text-classification-model", | |
| packages=find_packages(), | |
| classifiers=[ | |
| "Development Status :: 3 - Alpha", | |
| "Intended Audience :: Developers", | |
| "License :: OSI Approved :: MIT License", | |
| "Operating System :: OS Independent", | |
| "Programming Language :: Python :: 3", | |
| "Programming Language :: Python :: 3.7", | |
| "Programming Language :: Python :: 3.8", | |
| "Programming Language :: Python :: 3.9", | |
| ], | |
| python_requires='>=3.7', | |
| install_requires=[ | |
| "torch>=1.9.0", | |
| "transformers>=4.10.0", | |
| "tokenizers>=0.10.0", | |
| "datasets>=1.11.0", | |
| "scikit-learn>=0.24.0", | |
| "numpy>=1.20.0", | |
| ], | |
| ) |