Commit
·
3af6236
1
Parent(s):
78267f9
update README
Browse files
README.md
CHANGED
@@ -25,10 +25,11 @@ tags:
|
|
25 |
|
26 |
## How to use
|
27 |
You can use this model directly with a pipeline for masked language modeling:
|
|
|
28 |
```python
|
29 |
>>> from transformers import pipeline
|
30 |
>>> model = pipeline('fill-mask', model='manhtt-079/vipubmed-deberta-xsmall')
|
31 |
-
>>> text_with_mask = """Chúng_tôi mô_tả một trường_hợp bệnh_nhân nữ 44 tuổi được chẩn_đoán sarcoma tế_bào tua nang ( FDCS ) . FDCS là bệnh rất hiếm ảnh_hưởng đến tế_bào trình_diện kháng_nguyên đuôi gai và thường bị chẩn_đoán nhầm . Phẫu_thuật được coi là phương_thức điều_trị tốt nhất , tiếp_theo là hóa_trị . Trong trường_hợp của chúng_tôi , [
|
32 |
>>> model(text_with_mask)
|
33 |
|
34 |
[{'score': 0.7800273299217224,
|
@@ -69,7 +70,7 @@ outputs = model(**model_inputs)
|
|
69 |
from transformers import AutoTokenizer, TFAutoModel
|
70 |
tokenizer = AutoTokenizer.from_pretrained('manhtt-079/vipubmed-deberta-xsmall')
|
71 |
model = TFAutoModel.from_pretrained("manhtt-079/vipubmed-deberta-xsmall")
|
72 |
-
text = "Chúng_tôi mô_tả một trường_hợp bệnh_nhân nữ 44 tuổi được chẩn_đoán sarcoma tế_bào tua nang ( FDCS )"
|
73 |
model_inputs = tokenizer(text, return_tensors='tf')
|
74 |
outputs = model(**model_inputs)
|
75 |
```
|
|
|
25 |
|
26 |
## How to use
|
27 |
You can use this model directly with a pipeline for masked language modeling:
|
28 |
+
**_NOTE:_** The input text should be already word-segmented, you can use [Pyvi](https://github.com/trungtv/pyvi) (Python Vietnamese Core NLP Toolkit) to segment word before passing to the model.
|
29 |
```python
|
30 |
>>> from transformers import pipeline
|
31 |
>>> model = pipeline('fill-mask', model='manhtt-079/vipubmed-deberta-xsmall')
|
32 |
+
>>> text_with_mask = """Chúng_tôi mô_tả một trường_hợp bệnh_nhân nữ 44 tuổi được chẩn_đoán sarcoma tế_bào tua nang ( FDCS ) . FDCS là bệnh rất hiếm ảnh_hưởng đến tế_bào trình_diện kháng_nguyên đuôi gai và thường bị chẩn_đoán nhầm . Phẫu_thuật được coi là phương_thức điều_trị tốt nhất , tiếp_theo là hóa_trị . Trong trường_hợp của chúng_tôi , [MASK] cắt bỏ không_thể thực_hiện được , do đó bệnh_nhân được hóa_trị hai dòng , sau đó là cấy_ghép tủy xương , sau đó là hóa_trị ba với đáp_ứng trao_đổi chất hoàn_toàn được thấy trên"""
|
33 |
>>> model(text_with_mask)
|
34 |
|
35 |
[{'score': 0.7800273299217224,
|
|
|
70 |
from transformers import AutoTokenizer, TFAutoModel
|
71 |
tokenizer = AutoTokenizer.from_pretrained('manhtt-079/vipubmed-deberta-xsmall')
|
72 |
model = TFAutoModel.from_pretrained("manhtt-079/vipubmed-deberta-xsmall")
|
73 |
+
text = "Chúng_tôi mô_tả một trường_hợp bệnh_nhân nữ 44 tuổi được chẩn_đoán sarcoma tế_bào tua nang ( FDCS )."
|
74 |
model_inputs = tokenizer(text, return_tensors='tf')
|
75 |
outputs = model(**model_inputs)
|
76 |
```
|