summaryrefslogtreecommitdiff
path: root/transformers.spec
blob: 5bb59917df24363efa3808b554d3e58887652f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Name:           transformers
Version:        4.39.0
Release:        1%{?dist}
Summary:        Transformers provides thousands of pretrained models to perform tasks on different modalities.
License:        Apache-2.0
URL:    https://huggingface.co/docs/transformers/index
Source0:        https://github.com/huggingface/transformers/archive/refs/tags/v%{version}.tar.gz

Requires:	python3-filelock
Requires:	python3-packaging
Requires:	python3-numpy
Requires:	python3-pyyaml 
Requires:	python3-regex
Requires:	python3-requests
Requires:	python3-safetensors >= 0.3.1
Requires:	python3-tqdm  

%description
transformers is a popular library for natural language processing (NLP) tasks, especially in the domain of transfer learning for NLP. The transformers library provides pre-trained models (such as BERT, GPT, RoBERTa, etc.) that can be easily fine-tuned on custom datasets for tasks like text classification, question answering, text generation, and more.


# pkg section 1
%package -n python3-transformers
Summary: a python-lib provides transformers functionality
Provides: python-transformers
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
BuildRequires:	python3-wheel

%description -n python3-transformers
python3-transformers provides APIs for transformers realize.

# pkg section 2
%package -n help
Summary: docs for the transformers
Provides: python3-transformers-doc

%description -n help
description for the doc of the python-transformers

%prep
%autosetup -p1 -n transformers-%{version}
pip install hatchling

%build
%pyproject_build

%install
rm -rf $RPM_BUILD_ROOT
%pyproject_install

%files -n python3-transformers
%doc *.md
%license LICENSE
%{_bindir}/transformers-cli
%{python3_sitelib}/transformers/*
%{python3_sitelib}/transformers-%{version}.dist-info/*


%changelog
* Sat Mar 30 2024 youser<1328699220@qq.com> - 4.39.0-1
- pkg init