Tanhim commited on
Commit
2f79404
·
1 Parent(s): 190151e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -6,3 +6,17 @@ language: German or Deutsch <br />
6
  thumbnail: "https://huggingface.co/Tanhim/gpt2-model-de" <br />
7
  datasets: Ten Thousand German News Articles Dataset <br />
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  thumbnail: "https://huggingface.co/Tanhim/gpt2-model-de" <br />
7
  datasets: Ten Thousand German News Articles Dataset <br />
8
 
9
+
10
+ * How to use from the 🤗/transformers library <br />
11
+
12
+ from transformers import AutoTokenizer, AutoModelWithLMHead <br />
13
+
14
+ tokenizer = AutoTokenizer.from_pretrained("Tanhim/gpt2-model-de") <br />
15
+ model = AutoModelWithLMHead.from_pretrained("Tanhim/gpt2-model-de") <br />
16
+
17
+ * How to use from the pipeline <br />
18
+
19
+ from transformers import pipeline <br />
20
+
21
+ text-generation = pipeline("text-generation", model="Tanhim/gpt2-model-de", tokenizer="anonymous-german-nlp/german-gpt2") <br />
22
+ text-generation("Fußball ist mein Lieblingssport") <br />