add demo
Browse files
README.md
CHANGED
|
@@ -31,9 +31,8 @@ nfqa_model = RobertaNFQAClassification.from_pretrained("Lurunchik/nf-cats")
|
|
| 31 |
nfqa_tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")
|
| 32 |
```
|
| 33 |
|
| 34 |
-
##### Make prediction using helper function
|
| 35 |
```python
|
| 36 |
-
|
| 37 |
def get_nfqa_category_prediction(text):
|
| 38 |
output = nfqa_model(**nfqa_tokenizer(text, return_tensors="pt"))
|
| 39 |
index = output.logits.argmax()
|
|
@@ -44,6 +43,12 @@ get_nfqa_category_prediction('how to assign category?')
|
|
| 44 |
#'INSTRUCTION'
|
| 45 |
```
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
## Citation
|
| 48 |
|
| 49 |
If you use `NFQA-cats` in your work, please cite [this paper](https://dl.acm.org/doi/10.1145/3477495.3531926)
|
|
|
|
| 31 |
nfqa_tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")
|
| 32 |
```
|
| 33 |
|
| 34 |
+
##### Make prediction using helper function:
|
| 35 |
```python
|
|
|
|
| 36 |
def get_nfqa_category_prediction(text):
|
| 37 |
output = nfqa_model(**nfqa_tokenizer(text, return_tensors="pt"))
|
| 38 |
index = output.logits.argmax()
|
|
|
|
| 43 |
#'INSTRUCTION'
|
| 44 |
```
|
| 45 |
|
| 46 |
+
## Demo
|
| 47 |
+
You can test the model via [hugginface space](https://huggingface.co/spaces/Lurunchik/nf-cats).
|
| 48 |
+
|
| 49 |
+
[](https://huggingface.co/spaces/Lurunchik/nf-cats)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
## Citation
|
| 53 |
|
| 54 |
If you use `NFQA-cats` in your work, please cite [this paper](https://dl.acm.org/doi/10.1145/3477495.3531926)
|
demo.png
ADDED
|