mrutyunjay-patil
commited on
Commit
•
88a6e25
1
Parent(s):
1577bd5
Update README.md
Browse files
README.md
CHANGED
@@ -26,7 +26,9 @@ This model is optimized for processing larger inputs. For the most accurate resu
|
|
26 |
|
27 |
### How to use
|
28 |
|
29 |
-
You can use this model in your application using the Hugging Face Transformers library.
|
|
|
|
|
30 |
|
31 |
```python
|
32 |
from transformers import T5TokenizerFast, T5ForConditionalGeneration
|
@@ -36,7 +38,7 @@ tokenizer = T5TokenizerFast.from_pretrained('mrutyunjay-patil/keywordGen-v1')
|
|
36 |
model = T5ForConditionalGeneration.from_pretrained('mrutyunjay-patil/keywordGen-v1')
|
37 |
|
38 |
# Define the input text
|
39 |
-
input_text = "I love
|
40 |
|
41 |
# Encode the input text
|
42 |
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
|
|
26 |
|
27 |
### How to use
|
28 |
|
29 |
+
You can use this model in your application using the Hugging Face Transformers library.
|
30 |
+
Make sure to prefix your input with "Keyword: " for the model to generate keywords.
|
31 |
+
Here is an example:
|
32 |
|
33 |
```python
|
34 |
from transformers import T5TokenizerFast, T5ForConditionalGeneration
|
|
|
38 |
model = T5ForConditionalGeneration.from_pretrained('mrutyunjay-patil/keywordGen-v1')
|
39 |
|
40 |
# Define the input text
|
41 |
+
input_text = "Keyword: I recently purchased the new headphones and they are incredible. The sound quality is superb, providing crystal clear audio in all ranges. The noise-cancelling feature is very effective, blocking out almost all ambient noise. I also love the comfortable design - they fit perfectly over my ears and don't cause any discomfort, even after long periods of use. The battery life is also impressive, lasting up to 20 hours on a single charge. Overall, I'm extremely satisfied with this product."
|
42 |
|
43 |
# Encode the input text
|
44 |
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|