tuanle commited on
Commit
4a185c9
·
1 Parent(s): 47aec07

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -1
README.md CHANGED
@@ -42,12 +42,21 @@ The dataset is about 30k Vietnamese news dataset from website thanhnien.vn
42
  - P/s: I've already tried to deploy my model on Streamlit's cloud, but It was always being broken due to out of memory
43
 
44
 
45
- ## Usage (Huggingface)
46
  ```
47
  import torch
48
  from transformers import AutoTokenizer, AutoModelForCausalLM
49
 
50
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
 
 
 
 
 
 
 
 
 
51
  text = f"<|startoftext|> {category} <|headline|> {headline}"
52
 
53
  tokenizer = AutoTokenizer.from_pretrained("tuanle/VN-News-GPT2")
 
42
  - P/s: I've already tried to deploy my model on Streamlit's cloud, but It was always being broken due to out of memory
43
 
44
 
45
+ ## Example usage
46
  ```
47
  import torch
48
  from transformers import AutoTokenizer, AutoModelForCausalLM
49
 
50
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
51
+
52
+
53
+ """
54
+ Category includes: ['thời sự ', 'thế giới', 'tài chính kinh doanh', 'đời sống', 'văn hoá', 'giải trí', 'giới trẻ', 'giáo dục','công nghệ', 'sức khoẻ']
55
+ """
56
+
57
+ category = "thời sự"
58
+ headline = "Nam thanh niên" # A full headline or only some text
59
+
60
  text = f"<|startoftext|> {category} <|headline|> {headline}"
61
 
62
  tokenizer = AutoTokenizer.from_pretrained("tuanle/VN-News-GPT2")