Text Generation
Transformers
PyTorch
Safetensors
gpt2
stable-diffusion
prompt-generator
arxiv:2210.14140
Inference Endpoints
text-generation-inference
FredZhang7 commited on
Commit
568d8b6
1 Parent(s): bfe7a23

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -2
README.md CHANGED
@@ -38,7 +38,7 @@ Check out [**Fast Anime PromptGen**](https://huggingface.co/FredZhang7/anime-any
38
  See the Prompt Generator tab of [Paint Journey Demo](https://huggingface.co/spaces/FredZhang7/paint-journey-demo).
39
 
40
 
41
- ### PyTorch
42
 
43
  ```bash
44
  pip install --upgrade transformers
@@ -69,4 +69,16 @@ for i in range(len(output)):
69
  ```
70
 
71
  Example output:
72
- ![constrastive search](./constrastive_search.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  See the Prompt Generator tab of [Paint Journey Demo](https://huggingface.co/spaces/FredZhang7/paint-journey-demo).
39
 
40
 
41
+ ### Contrastive Search
42
 
43
  ```bash
44
  pip install --upgrade transformers
 
69
  ```
70
 
71
  Example output:
72
+ ![constrastive search](./constrastive_search.png)
73
+
74
+
75
+ ### Greedy Search
76
+
77
+ Replace `output` with
78
+
79
+ ```python
80
+ output = model.generate(input_ids, do_sample=True, temperature=temperature, top_k=top_k, max_length=max_length, num_return_sequences=num_return_sequences, early_stopping=True)
81
+ ```
82
+
83
+ Example output:
84
+ ![greedy search](./greedy_search.png)