Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Bert-base-uncased for Android-Ios Question Classification
|
2 |
+
|
3 |
+
**Code**: See [Ainize Workspace](https://ainize.ai/workspace/create?imageId=hnj95592adzr02xPTqss&git=https://github.com/EastHShin/Android-Ios-Classification-Workspace)
|
4 |
+
<br>
|
5 |
+
**Android-Ios-Classification DEMO**: [Ainize Endpoint](https://main-android-ios-classification-east-h-shin.endpoint.ainize.ai/)
|
6 |
+
<br>
|
7 |
+
**Android-Ios-Classification API**: [Ainize API](https://ainize.ai/EastHShin/Android-Ios-Classification)
|
8 |
+
<br>
|
9 |
+
<br>
|
10 |
+
## Overview
|
11 |
+
**Language model**: bert-base-cased
|
12 |
+
**Language**: English
|
13 |
+
**Training data**: Question classification Android-Ios dataset from [Kaggle](https://www.kaggle.com/xhlulu/question-classification-android-or-ios)
|
14 |
+
|
15 |
+
|
16 |
+
## Usage
|
17 |
+
|
18 |
+
```
|
19 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
20 |
+
|
21 |
+
model_path = "EasthShin/Android_Ios_Classification"
|
22 |
+
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
24 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
25 |
+
|
26 |
+
classifier = pipeline('text-classification', model=model_path, tokenizer=tokenizer)
|
27 |
+
|
28 |
+
question = "I bought goodnote in Appstore"
|
29 |
+
|
30 |
+
result = dict()
|
31 |
+
result[0] = classifier(question)[0]
|
32 |
+
```
|