Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
b7d964d
Update `post_process_object_detection` JSDoc
xenova Apr 7, 2023
c76374f
Add `jsdoc-to-markdown` as dev dependency
xenova Apr 7, 2023
606de46
Update `seq2seqLoadModel` JSDoc
xenova Apr 7, 2023
b127cee
Update `Tensor` JSDoc
xenova Apr 7, 2023
a38a77d
Update types for tokenizers.js
xenova Apr 7, 2023
eb574bb
Add `npm run docs` command to generate docs
xenova Apr 7, 2023
c3f853b
Use custom build of catharsis for parsing JSDoc
xenova Apr 7, 2023
421aa33
Replace CommonJS imports/exports with ES6
xenova Apr 13, 2023
d36ba31
Merge branch 'main' into docs
xenova Apr 17, 2023
9bfd126
Update package-lock.json
xenova Apr 17, 2023
cfa37d3
Merge `max` and `indexOfMax` functions, and return tuple of results
xenova Apr 17, 2023
4f158a5
Move math utility functions to `math_utils.js`
xenova Apr 17, 2023
aba491e
[version] Set version to 1.5.0.dev
xenova Apr 18, 2023
47b256a
Remove unnecessary inheritance from `Function` class
xenova Apr 18, 2023
a3ed4e3
Update `GenerationConfig` documentation
xenova Apr 19, 2023
abbbe3f
Fix `bert_prepare_model_inputs` when tokenizer returns array
xenova Apr 19, 2023
e015781
Extract test utilities to separate file
xenova Apr 19, 2023
9989d80
Set up basic test generator for tokenizers
xenova Apr 19, 2023
1900a42
Improve conversion script
xenova Apr 20, 2023
9f0d58c
Fix types in generation.js
xenova Apr 20, 2023
b430f46
Show warnings when running tests
xenova Apr 20, 2023
93b91ca
Add model cache folder (`.cache`) to .gitignore
xenova Apr 21, 2023
0c63bf8
Add loading and caching of models from the HF hub
xenova Apr 21, 2023
9a4b9c6
Update available environment variables
xenova Apr 21, 2023
a115751
Update imports to use new functions
xenova Apr 21, 2023
e8e4b5f
Add typedef for `PretrainedOptions`
xenova Apr 21, 2023
abce9e1
Update `from_pretrained` to accept HF model ids and local paths
xenova Apr 21, 2023
f264238
Update pipelines.js to use new formats
xenova Apr 21, 2023
e19c44e
Remove old debug log
xenova Apr 21, 2023
ed4be48
Add inheritance from `Function` back to `Callable`
xenova Apr 21, 2023
a4a5c7e
Rename `EmbeddingsPipeline` to `FeatureExtractionPipeline`
xenova Apr 21, 2023
feae6aa
Update JSDoc for `Callable` to indicate it is callable
xenova Apr 21, 2023
affcb5d
Indicate generation_config.json is non-fatal
xenova Apr 21, 2023
62a137f
Remove unused imports
xenova Apr 21, 2023
0dcae74
Update tasks.py to use new model format
xenova Apr 21, 2023
aca9eb4
Mark `image-segmentation` as a supported task
xenova Apr 21, 2023
d9018c1
Support new format for resizing (`config.size`)
xenova Apr 21, 2023
e8dc5a0
Only cache valid (200) responses
xenova Apr 22, 2023
6741651
Retrieve remote file if local file does not exist
xenova Apr 22, 2023
b47ac39
Update setting of wasmPaths in demo
xenova Apr 22, 2023
6231d67
Set `DEFAULT_CACHE_DIR` to null if not running locally
xenova Apr 22, 2023
f148be6
If longest_edge is not set, only resize based on shortest_edge
xenova Apr 22, 2023
8ab68cb
Implement center cropping in both canvas and sharp.js
xenova Apr 22, 2023
0b1be4e
Update image preprocessing method
xenova Apr 22, 2023
a6a6423
Update test cases
xenova Apr 22, 2023
4c2c0c4
Remove `dist` folder from repo
xenova Apr 22, 2023
e3f0631
Add dist and types folders to .gitignore
xenova Apr 22, 2023
0335000
Update TS/JS config files
xenova Apr 22, 2023
ad69f0a
Update package.json
xenova Apr 22, 2023
20f4b1f
Fix demo progress bars
xenova Apr 22, 2023
8941a10
Delete models folder
xenova Apr 23, 2023
6073ba4
Add models folder to .gitignore
xenova Apr 23, 2023
a0b53f6
Move demo site to examples folder
xenova Apr 23, 2023
f25b17c
Merge branch 'es6-rewrite' into docs
xenova Apr 24, 2023
1a90c6e
Fix ES6 imports
xenova Apr 24, 2023
b5c9163
Ignore url package from browser
xenova Apr 24, 2023
17349d1
Change `global` to `globalThis`
xenova Apr 24, 2023
29b7f9a
Convert webpack config to ES6
xenova Apr 24, 2023
0af5f5f
Only use url package when running locally
xenova Apr 24, 2023
0966deb
Lazily construct canvas elements (for when `OffscreenCanvas` is not d…
xenova Apr 24, 2023
e2cbd70
Update `__dirname` in env.js
xenova Apr 24, 2023
0172cf8
Do not use top-level awaits when importing ONNX runtime
xenova Apr 24, 2023
55dac3e
Update demo site imports
xenova Apr 24, 2023
795174d
Remove unused imports
xenova Apr 24, 2023
3eba196
Fix demo when running remotely
xenova Apr 24, 2023
18c8d9f
Disable SIMD for WASM on iOS devices
xenova Apr 24, 2023
1206827
Update dev dependency versions
xenova Apr 24, 2023
34db6d6
Add `onnxruntime-node` to browser ignore list
xenova Apr 24, 2023
e1ea278
Remove `onnxruntime-node` from webpack ignore plugin
xenova Apr 24, 2023
2a1dc38
Remove experimental top-level await from webpack config
xenova Apr 24, 2023
727c0d3
Await result of `cache.put` (Fixes #99)
xenova Apr 25, 2023
86d3aa1
Catch errors that may occur when adding to cache
xenova Apr 25, 2023
07f04de
Add example browser extension project
xenova Apr 25, 2023
2651a7b
Fix typo
xenova Apr 25, 2023
6cb5f72
Update example browser extension README
xenova Apr 25, 2023
ca7a101
Update .gitignore to only target build directories at root level
xenova Apr 25, 2023
aa32860
Fix typo
xenova Apr 25, 2023
c7697d0
Add `env.allowRemoteModels` option
xenova Apr 26, 2023
3576668
Update README.md
xenova Apr 26, 2023
67419fc
Also move `.onnx_data` files to the onnx folder
xenova Apr 27, 2023
814f9f0
Update tokenizer test function
xenova Apr 27, 2023
9c8963a
Ignore .json files generated by `test_generator.py`
xenova Apr 27, 2023
a6bb4b0
Remove `blenderbot-small` from tokenizer test
xenova Apr 27, 2023
6899153
Add sample electron application
xenova Apr 28, 2023
3a7d3c0
Add support for `M2M100` models
xenova Apr 28, 2023
1a518da
Add support for Nllb tokenizer
xenova Apr 28, 2023
517c281
Allow user to specify source and target language in translation pipeline
xenova Apr 28, 2023
142846f
Add tokenizer tests for `m2m_100` models
xenova Apr 28, 2023
dbe6e85
Save results file as utf-8
xenova Apr 28, 2023
7ee3c96
Log test name and input text if the test fails
xenova Apr 28, 2023
5ff0b86
Add translation test for multilingual (nllb) models
xenova Apr 28, 2023
e5ad227
Use `byte_fallback` option if present in config
xenova Apr 28, 2023
38b9d5f
Add warning/todo for MarianTokenizers
xenova Apr 28, 2023
8a783e8
Use `Object.create(null);` when creating empty objects
xenova Apr 28, 2023
019289e
Allow source language to be optional (use tokenizer's default)
xenova Apr 28, 2023
f85a735
Add listed support for NLLB models (Closes #101)
xenova Apr 29, 2023
375fac5
Add descriptions for tasks
xenova Apr 29, 2023
76e2a1f
Allow different order for `NllbTokenizer` post processor config
xenova Apr 30, 2023
926b279
Support loading of audio sources with 1 channel
xenova Apr 30, 2023
8266094
Replace `for...of` with `for` loop
xenova May 1, 2023
d0509e0
Fix `ByteLevel` pretokenization
xenova May 1, 2023
63ccc3d
Use `Map` for `tokens_to_ids`
xenova May 1, 2023
459ac7f
Fix `BertPreTokenizer` regex pattern
xenova May 1, 2023
80912c0
Reformat tests generator
xenova May 2, 2023
a861785
Use jest for unit testing
xenova May 2, 2023
2e9c789
Add `docs-preview` script to package.json
xenova May 2, 2023
9a5e8a9
Do not track coverage reports
xenova May 2, 2023
25993e7
Create jest.config.mjs
xenova May 2, 2023
c29bd79
Move pipelines test to jest module
xenova May 2, 2023
f67d964
Move tokenizers test to jest module
xenova May 2, 2023
27c9d8d
Fix `isDeepEqual` function
xenova May 2, 2023
595efc6
Export `PreTrainedModel` from transformers
xenova May 2, 2023
8de18bc
Create hub.test.js
xenova May 2, 2023
4a282bf
Use interpolation method specified in processor's config
xenova May 2, 2023
54ab260
Add type acquisition include for jest
xenova May 2, 2023
508f000
Temporarily disable pipeline tests
xenova May 2, 2023
216d498
Create basic github actions workflow
xenova May 2, 2023
f0cba36
Allow ci from docs branch
xenova May 2, 2023
06db0fe
Update package-lock.json
xenova May 2, 2023
aae36e5
Remove test for 14.x
xenova May 2, 2023
c8c2b35
Update tests.yml
xenova May 2, 2023
626168b
Update tests.yml
xenova May 2, 2023
681d291
Fix `ReadableStream` import for Node 16.x
xenova May 2, 2023
ca96c7e
Generate tests before running unit tests
xenova May 2, 2023
e37b9e5
Move `generate-tests` to github workflow
xenova May 2, 2023
abafbee
Allow remote models for testing
xenova May 2, 2023
60f0e62
Update versions of Node.js to test on
xenova May 2, 2023
b7e21ff
Replace default models with web-ready versions
xenova May 3, 2023
aabf516
Differentiate between local and remote testing
xenova May 3, 2023
5e13955
Update list of converted models
xenova May 3, 2023
8179372
Temporarily remove `mobilebert` tokenizer test
xenova May 3, 2023
0cbfaa4
Remove `node:` prefix for `stream/web` import
xenova May 3, 2023
f6a6519
Improve unit testing framework
xenova May 4, 2023
348398e
Update webpack.config.js
xenova May 4, 2023
20b5fda
Refactor test suite to fix Jest memory leaks
xenova May 4, 2023
91b91e1
Fix failing tests
xenova May 4, 2023
aa910b4
Update JSDocs
xenova May 6, 2023
403d175
Reorganize project structure
xenova May 6, 2023
9665c1e
Update LICENSE
xenova May 6, 2023
7365734
Add `SamModel`
xenova May 7, 2023
267ea55
Export image utilities from transformers.js
xenova May 7, 2023
2512693
Implement preprocessing and postprocessing for SAM models
xenova May 8, 2023
2b5073f
Fix type issues
xenova May 8, 2023
4422adb
Fix `TypedArray` typedef
xenova May 8, 2023
b25f193
Update package.json
xenova May 8, 2023
c078080
Add links to submodules in main module entry point
xenova May 8, 2023
3d0cd78
Update model name in example
xenova May 8, 2023
45031b6
Remove redundant `-` char in JSDoc
xenova May 8, 2023
c4c458c
Move `toI64Tensor` function outside class
xenova May 9, 2023
b54e3e0
Add JSDoc for `_call` methods
xenova May 9, 2023
af73c17
Update JSDoc
xenova May 9, 2023
7c7a100
Replace switch statement with object mapping
xenova May 9, 2023
656015f
Add example react application
xenova May 11, 2023
c22fb2d
Add `ready` event for loading pipeline
xenova May 11, 2023
bf8198e
Fix ONNX imports for react applications
xenova May 11, 2023
c79a949
Add JSDoc for `NllbTokenizer`
xenova May 11, 2023
d4cd9de
Update .eslintrc.cjs
xenova May 12, 2023
a73e855
Add docs folder
xenova May 13, 2023
756cf66
Update env.js JSDoc
xenova May 13, 2023
19773f6
Update README.md
xenova May 13, 2023
e17f0d3
Add basic workflow files for generating docs
xenova May 13, 2023
0682272
[temp] Use custom doc-builder
xenova May 13, 2023
ee57c99
Build documentation on docs branch too
xenova May 13, 2023
644a6d9
Update workflow paths
xenova May 13, 2023
4aa4a3f
Add `repo_owner` to documentation build workflows
xenova May 13, 2023
17aa583
Add npm scripts for building documentation
xenova May 13, 2023
4aec9dd
Use relative path for doc generation
xenova May 13, 2023
f285691
Add JSDoc config file
xenova May 13, 2023
8bb6fba
Update jsdoc-conf.json
xenova May 13, 2023
518ff70
Update `path_to_docs` in GitHub workflows
xenova May 13, 2023
fa19890
Add LlamaTokenizer (#109)
xenova May 14, 2023
7d91549
Update tokenizers and add decode unit tests
xenova May 15, 2023
6478cfa
Update tokenizers.test.js
xenova May 15, 2023
2d05ec8
Delete tests/tokenizers folder
xenova May 15, 2023
9c4b82d
Update github action workflows
xenova May 15, 2023
98e70ee
Update documentation.yml
xenova May 15, 2023
dff2b3b
[docs] Move snippets out of source folder
xenova May 15, 2023
13391f4
Add index operations to `Tensor` objects
xenova May 15, 2023
88be559
Update tasks.py
xenova May 15, 2023
76c6377
Allow negative indices for slicing
xenova May 15, 2023
ad3676f
Update package.json
xenova May 15, 2023
6b16a55
Update package.json
xenova May 15, 2023
4878d02
Update README shields
xenova May 15, 2023
3b86267
Merge branch 'main' into docs
xenova May 15, 2023
a2c6ee6
Update 3_examples.snippet
xenova May 15, 2023
9640a36
Update README
xenova May 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/delete-doc-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Delete dev documentation

on:
pull_request:
types: [closed]

jobs:
delete:
uses: huggingface/doc-builder/.github/workflows/delete_doc_comment.yml@main
with:
pr_number: ${{ github.event.number }}
package: transformers.js
17 changes: 17 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build documentation

on:
workflow_dispatch:
push:
branches: [ main, docs ]

jobs:
build:
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
with:
repo_owner: xenova
commit_sha: ${{ github.sha }}
package: transformers.js
path_to_docs: transformers.js/docs/source
pre_command: cd transformers.js && npm install && npm run docs-api
additional_args: --not_python_module
20 changes: 20 additions & 0 deletions .github/workflows/pr-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build PR Documentation

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main
with:
repo_owner: xenova
commit_sha: ${{ github.sha }}
pr_number: ${{ github.event.number }}
package: transformers.js
path_to_docs: transformers.js/docs/source
pre_command: cd transformers.js && npm install && npm run docs-api
additional_args: --not_python_module
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Unit tests

on:
push:
branches: [ main, docs ]
pull_request:
branches: [ main, docs ]

env:
TESTING_REMOTELY: true

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, latest, node]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: pip install -r scripts/requirements.txt

# Setup the testing environment
- run: npm run generate-tests
- run: git lfs install && git clone https://huggingface.co/Xenova/t5-small ./models/t5-small

# Actually run tests
- run: npm run test
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
__pycache__
.vscode
node_modules
.cache

# Do not track build artifacts/generated files
/dist
/types
/models

# Do not track coverage reports
/coverage
223 changes: 202 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,202 @@
MIT License

Copyright (c) 2023 Xenova

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading