Ateeqq commited on
Commit
2298265
1 Parent(s): 15da904

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -24
README.md CHANGED
@@ -12,16 +12,21 @@ inference:
12
  max_length: 256
13
  widget:
14
  - text: >-
15
- description: Men Business Wrist Watch Quartz Casual Belt Men's Watch Brown Watch
 
16
  example_title: Example 1
17
- - text: >-
18
- description: SAMSUNG 16" Galaxy Book4 Pro Laptop PC Computer, Intel Core 7
19
  example_title: Example 2
20
  - text: >-
21
- description: Basics 18-Piece Kitchen Dinnerware Set, Plates, Dishes, Bowls - White
 
22
  example_title: Example 3
23
  datasets:
24
  - Ateeqq/Amazon-Product-Description
 
 
 
 
25
  ---
26
  # Product Description Generator
27
 
@@ -36,25 +41,6 @@ T5 model expects a task related prefix: since it is a description generation tas
36
  ```python
37
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
38
 
39
- tokenizer = AutoTokenizer.from_pretrained("Ateeqq/product-description-generator", token="your_token")
40
- model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/product-description-generator", token="your_token")
41
-
42
- input_text = "18-Piece Kitchen Dinnerware white Set, Plates, Dishes, Bowls"
43
-
44
- inputs = tokenizer.encode("description: " + input_text, return_tensors="pt", max_length=128, truncation=True)
45
-
46
- outputs = model.generate(inputs, max_length=400, num_beams=2, num_beam_groups=2, num_return_sequences=2, repetition_penalty=1.0, diversity_penalty=3.0, no_repeat_ngram_size=2, temperature=0.9, early_stopping=True)
47
-
48
- description = tokenizer.decode(outputs[1], skip_special_tokens=True)
49
-
50
- print(description)
51
- ```
52
-
53
- ## Getting Multiple Outputs
54
-
55
- ```python
56
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
57
-
58
  device = "cuda"
59
  tokenizer = AutoTokenizer.from_pretrained("Ateeqq/product-description-generator", token='your_token')
60
  model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/product-description-generator", token='your_token').to(device)
@@ -83,7 +69,7 @@ generate_description(title)
83
  'The 18 Piece Kitchen Dinnerware Set features a white plate, dish and bowl. This set is made of durable stainless steel with an elegant design that will add elegance to your kitchen.',
84
  'This 18-piece dinnerware set is made of durable stainless steel. It features a white finish and comes with an easy to clean handle for ease of cleaning. The bowls are dishwasher safe, microwave safe or can be used as tablecloths in the kitchen.',
85
  'Kitchen Dinnerware is a great addition to your kitchen. This 18-piece set includes four plates, two dishes and three bowls for serving food or beverages in the dining room with an elegant design that will add sophistication to any tabletop setting.',
86
- "p>This 18-piece dinnerware set is made of high quality stainless steel. The white plate and dish are dishwasher safe, easy to clean with the included lids for ease of use. This dining table set features an elegant design that will add elegance style in your kitchen or living room. It's also perfect for serving food on any occasion like birthday parties, house warming ceremonies, Thanksgiving celebrations etc."]
87
  ```
88
 
89
  ## Features
 
12
  max_length: 256
13
  widget:
14
  - text: >-
15
+ description: Men Business Wrist Watch Quartz Casual Belt Men's Watch Brown
16
+ Watch
17
  example_title: Example 1
18
+ - text: 'description: SAMSUNG Galaxy Book-4 Pro Laptop PC Computer, Intel Core 7'
 
19
  example_title: Example 2
20
  - text: >-
21
+ description: Basics 18-Piece Kitchen Dinnerware Set, Plates, Dishes, Bowls -
22
+ White
23
  example_title: Example 3
24
  datasets:
25
  - Ateeqq/Amazon-Product-Description
26
+ language:
27
+ - en
28
+ library_name: transformers
29
+ pipeline_tag: text2text-generation
30
  ---
31
  # Product Description Generator
32
 
 
41
  ```python
42
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  device = "cuda"
45
  tokenizer = AutoTokenizer.from_pretrained("Ateeqq/product-description-generator", token='your_token')
46
  model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/product-description-generator", token='your_token').to(device)
 
69
  'The 18 Piece Kitchen Dinnerware Set features a white plate, dish and bowl. This set is made of durable stainless steel with an elegant design that will add elegance to your kitchen.',
70
  'This 18-piece dinnerware set is made of durable stainless steel. It features a white finish and comes with an easy to clean handle for ease of cleaning. The bowls are dishwasher safe, microwave safe or can be used as tablecloths in the kitchen.',
71
  'Kitchen Dinnerware is a great addition to your kitchen. This 18-piece set includes four plates, two dishes and three bowls for serving food or beverages in the dining room with an elegant design that will add sophistication to any tabletop setting.',
72
+ "18-Piece Kitchen Dinnerware White Set, Plates & DisheSize(LxW) Size (HXD), Material is made of high quality stainless steel and the bowl has an elegant design. The dish set includes 1 plate with 2 plates; 3 dishes for 4 cups or 6 serving spoon/bowl 2. This dinner table sets are perfect to serve your food in style while also being easy on clean up 3. These white kitchen dining tables have been designed by professional chefs using only premium materials that will not scratch surfaces 4. Easy cleaning dishwasher safe 5. Durable material can be used as disposable wash cloth 6. Perfect gift idea For family members who love cooking."]
73
  ```
74
 
75
  ## Features