Update README.md
Browse files
README.md
CHANGED
|
@@ -8,9 +8,9 @@ license: mit
|
|
| 8 |
|
| 9 |
# Indonesia Recipe Ingredients Generator Model
|
| 10 |
|
| 11 |
-
**WARNING: inference on Huggingface might not run since the tokenizer is not
|
| 12 |
-
Please wait for it**
|
| 13 |
|
|
|
|
| 14 |
|
| 15 |
๐ **Have fun on generating ingredients** ๐
|
| 16 |
|
|
@@ -33,6 +33,9 @@ Since we use `indobart-v2`, we need to use their tokenizer.
|
|
| 33 |
|
| 34 |
First, install the tokenizer by doing `pip install indobenchmark-toolkit`.
|
| 35 |
|
|
|
|
|
|
|
|
|
|
| 36 |
After that, you can load the tokenizer:
|
| 37 |
|
| 38 |
```python
|
|
@@ -41,6 +44,11 @@ from indobenchmark.tokenization_indonlg import IndoNLGTokenizer
|
|
| 41 |
tokenizer = IndoNLGTokenizer.from_pretrained("haryoaw/id-recigen-bart")
|
| 42 |
```
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
### Model
|
| 45 |
|
| 46 |
The model can be loaded by using AutoModel.
|
|
@@ -52,7 +60,9 @@ model = AutoModelForSeq2SeqLM.from_pretrained("haryoaw/id-recigen-bart")
|
|
| 52 |
```
|
| 53 |
|
| 54 |
|
| 55 |
-
##
|
|
|
|
|
|
|
| 56 |
|
| 57 |
```
|
| 58 |
sayur asam
|
|
@@ -62,6 +72,6 @@ sayur asam
|
|
| 62 |
nasi goreng ayam
|
| 63 |
```
|
| 64 |
|
| 65 |
-
~To be continued
|
| 66 |
|
| 67 |
|
|
|
|
| 8 |
|
| 9 |
# Indonesia Recipe Ingredients Generator Model
|
| 10 |
|
| 11 |
+
**WARNING: inference on Huggingface might not run since the tokenizer used is not transformers's tokenizer.**
|
|
|
|
| 12 |
|
| 13 |
+
Feel free to test the model [in this space](https://huggingface.co/spaces/haryoaw/id-recigen)
|
| 14 |
|
| 15 |
๐ **Have fun on generating ingredients** ๐
|
| 16 |
|
|
|
|
| 33 |
|
| 34 |
First, install the tokenizer by doing `pip install indobenchmark-toolkit`.
|
| 35 |
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
After that, you can load the tokenizer:
|
| 40 |
|
| 41 |
```python
|
|
|
|
| 44 |
tokenizer = IndoNLGTokenizer.from_pretrained("haryoaw/id-recigen-bart")
|
| 45 |
```
|
| 46 |
|
| 47 |
+
**EDIT**:
|
| 48 |
+
|
| 49 |
+
Seems like the tokenizer in the package is not the same as the one that I use to finetune the model.
|
| 50 |
+
There are some noticeable bug such as some subword tokens are not considered as subword. Nevertheless, it stil works!
|
| 51 |
+
|
| 52 |
### Model
|
| 53 |
|
| 54 |
The model can be loaded by using AutoModel.
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
|
| 63 |
+
## Input Example
|
| 64 |
+
|
| 65 |
+
Make sure to input a **LOWERCASE** food name. The tokenizer is case-sensitive!
|
| 66 |
|
| 67 |
```
|
| 68 |
sayur asam
|
|
|
|
| 72 |
nasi goreng ayam
|
| 73 |
```
|
| 74 |
|
| 75 |
+
~To be continued..
|
| 76 |
|
| 77 |
|