Ateeqq commited on
Commit
252c0c9
·
verified ·
1 Parent(s): 2ac1376

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -8
README.md CHANGED
@@ -8,14 +8,12 @@ inference:
8
  repetition_penalty: 10.0
9
  diversity_penalty: 3.01
10
  no_repeat_ngram_size: 2
11
- temperature: 0.9
12
  max_length: 128
13
  widget:
14
  - text: >-
15
- Jumping on the bandwagon in the artificial intelligence race, Meta has
16
- started rolling out AI chatbot feature for its social networking sites
17
- WhatsApp and Instagram across India and Africa, India Today reported.
18
- example_title: 1st - Meta News
19
  ---
20
 
21
 
@@ -37,9 +35,22 @@ This repository contains a fine-tuned text-rewriting model based on the T5-Base
37
 
38
  ## Getting Started:
39
 
40
- (Instructions on how to use the model will be added here.
41
- This section may include specific requirements, code examples, or links to
42
- documentation.)
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  **Disclaimer:**
45
 
 
8
  repetition_penalty: 10.0
9
  diversity_penalty: 3.01
10
  no_repeat_ngram_size: 2
11
+ temperature: 0.8
12
  max_length: 128
13
  widget:
14
  - text: >-
15
+ Deep learning is a type of machine learning and artificial intelligence (AI) that imitates the way humans gain certain types of knowledge.
16
+ example_title: Deep learning
 
 
17
  ---
18
 
19
 
 
35
 
36
  ## Getting Started:
37
 
38
+ ```python
39
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
40
+
41
+ # Replace 'YOUR_TOKEN' with your actual Hugging Face access token
42
+ tokenizer = AutoTokenizer.from_pretrained("Ateeqq/Text-Rewriter-Paraphraser", token='YOUR_TOKEN')
43
+ model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/Text-Rewriter-Paraphraser", token='YOUR_TOKEN')
44
+ ```
45
+ ```python
46
+ text = "Data science is a field that deals with extracting knowledge and insights from data. "
47
+
48
+ inputs = tokenizer(text, return_tensors="pt")
49
+
50
+ output = model.generate(**inputs, max_length=50)
51
+
52
+ print(tokenizer.decode(output[0]))
53
+ ```
54
 
55
  **Disclaimer:**
56