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

Fix formatting

Browse files
Files changed (1) hide show
  1. README.md +4 -4
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
- ### Contrastive Search
42
 
43
  ```bash
44
  pip install --upgrade transformers
@@ -68,11 +68,11 @@ for i in range(len(output)):
68
  print('\033[92m' + tokenizer.decode(output[i], skip_special_tokens=True) + '\033[0m\n')
69
  ```
70
 
71
- Example output:
72
  ![constrastive search](./constrastive_search.png)
73
 
74
 
75
- ### Greedy Search
76
 
77
  Replace `output` with
78
 
@@ -80,5 +80,5 @@ Replace `output` with
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)
 
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
 
68
  print('\033[92m' + tokenizer.decode(output[i], skip_special_tokens=True) + '\033[0m\n')
69
  ```
70
 
71
+ Example of generated prompts:
72
  ![constrastive search](./constrastive_search.png)
73
 
74
 
75
+ ## Greedy Search
76
 
77
  Replace `output` with
78
 
 
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 of generated prompts:
84
  ![greedy search](./greedy_search.png)