imjeffhi commited on
Commit
26d2b0e
1 Parent(s): d34e4fc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -28,7 +28,7 @@ If you only want to paraphrase and don't necessarily care about the specifics of
28
 
29
  Initializing model using GPU and Bfloat16 precision:
30
 
31
- ```python:
32
  from transformers import pipeline
33
  from torch import bfloat16
34
 
@@ -37,13 +37,13 @@ para_gen = pipeline('text2text-generation', model="imjeffhi/paraphrase_generator
37
 
38
  Calling model:
39
 
40
- ```python:
41
  options_phrase = "Paraphrase: large changes, match input."
42
  input_text = "A paraphrase is a restatement of the meaning of a text or passage using other words."
43
  output = para_gen(f"{options_phrase} {input_text}", do_sample=True, top_k=10, num_return_sequences=5)
44
  ```
45
  Output:
46
- ```python:
47
  [{'generated_text': 'A paraphrase is a modification of the meaning or expression of a text or passage by using other words.'},
48
  {'generated_text': 'A paraphrase is a continuation of the meaning of a text or a passage using other words.'},
49
  {'generated_text': 'A paraphrase is the restatement of the meaning of a text or other passage containing other words.'},
 
28
 
29
  Initializing model using GPU and Bfloat16 precision:
30
 
31
+ ```python
32
  from transformers import pipeline
33
  from torch import bfloat16
34
 
 
37
 
38
  Calling model:
39
 
40
+ ```python
41
  options_phrase = "Paraphrase: large changes, match input."
42
  input_text = "A paraphrase is a restatement of the meaning of a text or passage using other words."
43
  output = para_gen(f"{options_phrase} {input_text}", do_sample=True, top_k=10, num_return_sequences=5)
44
  ```
45
  Output:
46
+ ```python
47
  [{'generated_text': 'A paraphrase is a modification of the meaning or expression of a text or passage by using other words.'},
48
  {'generated_text': 'A paraphrase is a continuation of the meaning of a text or a passage using other words.'},
49
  {'generated_text': 'A paraphrase is the restatement of the meaning of a text or other passage containing other words.'},