update readme
Browse files
README.md
CHANGED
@@ -15,9 +15,20 @@ pipeline_tag: sentence-similarity
|
|
15 |
library_name: generic
|
16 |
---
|
17 |
|
|
|
|
|
18 |
sentence-transformers の widget を日本語対応できないか実験しています。
|
19 |
generic library を実行するために public repo にしています。
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
|
|
|
15 |
library_name: generic
|
16 |
---
|
17 |
|
18 |
+
## 目的
|
19 |
+
|
20 |
sentence-transformers の widget を日本語対応できないか実験しています。
|
21 |
generic library を実行するために public repo にしています。
|
22 |
|
23 |
+
README.md, pipeline.py, requirements.txt 以外のファイルは [cl-nagoya/sup-simcse-ja-base](https://huggingface.co/cl-nagoya/sup-simcse-ja-base) (CC BY-SA 4.0) のコピーです。
|
24 |
+
|
25 |
+
## 結果
|
26 |
+
|
27 |
+
以下の設定をすると日本語でも Sentense Similarity の Widget が実行可能になりました。
|
28 |
+
|
29 |
+
- [README.md](https://huggingface.co/yuji96/ja-support-for-inference-api/blob/main/README.md): `pipeline_tag: sentence-similarity, library_name: generic` を指定
|
30 |
+
- [pipeline.py](https://huggingface.co/yuji96/ja-support-for-inference-api/blob/main/pipeline.py): 本家の [pipelines/sentence_similarity.py](https://github.com/huggingface/api-inference-community/blob/main/docker_images/sentence_transformers/app/pipelines/sentence_similarity.py) のほぼコピペ
|
31 |
+
- [requirements.txt](https://huggingface.co/yuji96/ja-support-for-inference-api/blob/main/requirements.txt): `sentense-transformer` に加えて `fugashi[unidic-lite]
|
32 |
+
` などの追加ライブラリを指定
|
33 |
|
34 |
+
> language tag が Japanese のときだけ裏側で `pip install transformer[ja]` をしてもらうのが最善に感じますが、contribute できそうな repository が見当たりませんでした。
|