Transformers
English
Files changed (1) hide show
  1. README.md +8 -4
README.md CHANGED
@@ -31,11 +31,14 @@ Final test Loss: 2.7963
31
 
32
  _________________________________________
33
 
34
- try the following script for inference:
35
 
36
- !pip install huggingface_hub
37
- !pip install transformers
38
- !pip install torch
 
 
 
39
  from transformers import GPT2Tokenizer, GPT2Config, GPT2LMHeadModel
40
  from huggingface_hub import hf_hub_download
41
  import torch
@@ -91,3 +94,4 @@ while True:
91
  break
92
  output = generate_text(prompt)
93
  print(f"Generated text: {output}")
 
 
31
 
32
  _________________________________________
33
 
34
+ ## Inference
35
 
36
+
37
+ "pip install huggingface_hub"
38
+ "pip install transformers"
39
+ "pip install torch"
40
+
41
+ ```python
42
  from transformers import GPT2Tokenizer, GPT2Config, GPT2LMHeadModel
43
  from huggingface_hub import hf_hub_download
44
  import torch
 
94
  break
95
  output = generate_text(prompt)
96
  print(f"Generated text: {output}")
97
+ ```