abdelhalim commited on
Commit
42642ed
·
1 Parent(s): 688697e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - BSD-1
4
+ tags:
5
+ - Text2Text Generation
6
+ - Business names
7
+ - Recommendation system
8
+ metrics:
9
+ - Rouge
10
+
11
+ ---
12
+
13
+ **Context**
14
+
15
+ Most of the business name generated systems based on Rule based approaches and only take as input names or keywords not context. The present trained model its aim is to take in a summary for a business idea (1-2 sentences, could be even keywords) and generate a viable business name for users.
16
+
17
+ **Introduction**
18
+
19
+ The goal is to create an AI service which is helpful to people and yet could turn into a small business. After fiddling around with T5, I have realized it has an immense creative potential that could prove useful in creative text generation. So, after scraping around 350.000 websites from different Domain list, I have fine-tuned T5 small parameter model. Results are weirdly accurate and also creative at the same time.
20
+ T5 small is already pre-trained language model which is capable of creating text with a near human quality. It's able to understand the context of a given prefix to generate text. When fine tuned based on the domain names and their meta context, it was able to understand the relation between domain name and the content of the website.
21
+
22
+ **Dataset**
23
+
24
+ t5 small needs lots of data to be trained properly. Quality of the data that we will use for fine tuning will have a direct effect on the model quality therefore we need to make sure the data we are scraping from the websites are as clean as possible. The dateset will not be available but under request.
25
+
26
+ # Usage
27
+ In order to use the model in your Python script just copy the following code:
28
+ ```python
29
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
30
+
31
+ tokenizer = AutoTokenizer.from_pretrained("abdelhalim/Rec_Business_Names")
32
+ model = AutoModelForSeq2SeqLM.from_pretrained("abdelhalim/Rec_Business_Names")
33
+
34
+ encoder_input_str = "fourniture and decor brand"
35
+ number_of_business_names = 10
36
+
37
+ input_ids = tokenizer(encoder_input_str, return_tensors="pt").input_ids
38
+
39
+ outputs = model.generate(
40
+ input_ids,
41
+ num_beams=number_of_business_names,
42
+ num_return_sequences=number_of_business_names,
43
+ no_repeat_ngram_size=1,
44
+ remove_invalid_values=True,
45
+ )
46
+
47
+ for i in range(len(outputs)):
48
+ print(tokenizer.decode(outputs[i], skip_special_tokens=True))
49
+
50
+ #Output
51
+ edgy.com
52
+ Furnace.com
53
+ Decorsy.com
54
+ Furnacea.com
55
+ Decorse.com
56
+ Furniture.com
57
+ edgys.com
58
+ Furnishing.com
59
+ Lavender.com
60
+ edgya.com
61
+
62
+ ```