File size: 1,441 Bytes
c7af52d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language: zh
widget:
- text: "水稻生長的適宜溫度是多少?"
  example_title: "LABEL_1"
- text: "心臟病的病因?"
  example_title: "LABEL_0"

---
# Agriculture-Classification 

This is a model used for classifying whether it is a agricultural question or not.

## Usage

### In Transformers
```python
from transformers import BertTokenizer, BertForSequenceClassification, pipeline
model_name = "NchuNLP/Agriculture-Classification"
tokenizer = BertTokenizer.from_pretrained(model_name)
model = BertForSequenceClassification.from_pretrained(model_name, num_labels=2)

# Get predictions 
nlp = pipeline('text-classification', model=model, tokenizer=tokenizer)
query = "水稻生長的適宜溫度是多少?"
res = nlp(query)
```

## Authors
**Peng-Yi Lin:** gigilinqoo@gmail.com

**Yao-Chung Fan:** yfan@nchu.edu.tw

## About us

[中興大學自然語言處理實驗室](https://nlpnchu.org/)研究方向圍繞於深度學習技術在文字資料探勘 (Text Mining) 與自然語言處理 (Natural Language Processing) 方面之研究,目前實驗室成員的研究主題著重於機器閱讀理解 (Machine Reading Comprehension) 以及自然語言生成 (Natural Language Generation) 兩面向。

## More Information

<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>.