Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: zh
|
| 3 |
+
widget:
|
| 4 |
+
- text: "水稻生長的適宜溫度是多少?"
|
| 5 |
+
example_title: "LABEL_1"
|
| 6 |
+
- text: "心臟病的病因?"
|
| 7 |
+
example_title: "LABEL_0"
|
| 8 |
+
|
| 9 |
+
---
|
| 10 |
+
# Agriculture-Classification
|
| 11 |
+
|
| 12 |
+
This is a model used for classifying whether it is a agricultural question or not.
|
| 13 |
+
|
| 14 |
+
## Usage
|
| 15 |
+
|
| 16 |
+
### In Transformers
|
| 17 |
+
```python
|
| 18 |
+
from transformers import BertTokenizer, BertForSequenceClassification, pipeline
|
| 19 |
+
model_name = "NchuNLP/Agriculture-Classification"
|
| 20 |
+
tokenizer = BertTokenizer.from_pretrained(model_name)
|
| 21 |
+
model = BertForSequenceClassification.from_pretrained(model_name, num_labels=2)
|
| 22 |
+
|
| 23 |
+
# Get predictions
|
| 24 |
+
nlp = pipeline('text-classification', model=model, tokenizer=tokenizer)
|
| 25 |
+
query = "水稻生長的適宜溫度是多少?"
|
| 26 |
+
res = nlp(query)
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
## Authors
|
| 30 |
+
**Peng-Yi Lin:** gigilinqoo@gmail.com
|
| 31 |
+
|
| 32 |
+
**Yao-Chung Fan:** yfan@nchu.edu.tw
|
| 33 |
+
|
| 34 |
+
## About us
|
| 35 |
+
|
| 36 |
+
[中興大學自然語言處理實驗室](https://nlpnchu.org/)研究方向圍繞於深度學習技術在文字資料探勘 (Text Mining) 與自然語言處理 (Natural Language Processing) 方面之研究,目前實驗室成員的研究主題著重於機器閱讀理解 (Machine Reading Comprehension) 以及自然語言生成 (Natural Language Generation) 兩面向。
|
| 37 |
+
|
| 38 |
+
## More Information
|
| 39 |
+
|
| 40 |
+
<p>For more info about Nchu NLP Lab, visit our <strong><a href="https://demo.nlpnchu.org/">Lab Online Demo</a></strong> repo and <strong><a href="https://github.com/NCHU-NLP-Lab">GitHub</a></strong>.
|