OLIVE2403 commited on
Commit
c19c007
·
verified ·
1 Parent(s): bc2b947

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -15
app.py CHANGED
@@ -4,34 +4,32 @@ from transformers import pipeline
4
  import gradio as gr
5
 
6
  # Load FLAN-T5-LARGE pipeline
7
- generator = pipeline("text2text-generation", model="google/flan-t5-large")
8
 
9
  def generate_brand_identity(startup_idea):
10
- # Make each prompt practical and targeted
11
-
12
  # Brand Names
13
- prompt_name = f"Generate 3 unique and creative brand names for a startup that offers: {startup_idea}. The names should be catchy and relevant. Separate with commas."
14
  brand_names = generator(prompt_name, max_length=60, num_return_sequences=1)[0]["generated_text"]
15
 
16
  # Tagline
17
- tagline_prompt = f"Write a 1-line catchy tagline for a startup that offers: {startup_idea}. Focus on value, not just flair."
18
  tagline = generator(tagline_prompt, max_length=30, num_return_sequences=1)[0]['generated_text']
19
 
20
- # Brand Personality Description
21
- personality_prompt = f"Describe the brand personality for a startup that offers: {startup_idea}. Use descriptive language."
22
- personality = generator(personality_prompt, max_length=50, num_return_sequences=1)[0]['generated_text']
23
 
24
- # Suggested Brand Colours
25
- colours_prompt = f"Suggest two brand colour themes (primary and secondary) with HEX codes for a startup that offers: {startup_idea}."
26
  colours = generator(colours_prompt, max_length=40, num_return_sequences=1)[0]['generated_text']
27
 
28
- # Target Audience Description
29
- audience_prompt = f"Identify the most likely target audience for a startup that offers: {startup_idea}. Include age, profession, or lifestyle."
30
  audience = generator(audience_prompt, max_length=50, num_return_sequences=1)[0]['generated_text']
31
 
32
- # Slogan Options
33
- slogan_prompt = f"Generate 2 short, memorable slogans for a startup that offers: {startup_idea}. Keep them unique and practical."
34
- slogan = generator(slogan_prompt, max_length=40, num_return_sequences=1)[0]['generated_text']
35
 
36
  return (
37
  brand_names.strip(),
 
4
  import gradio as gr
5
 
6
  # Load FLAN-T5-LARGE pipeline
7
+ generator = pipeline("text-generation", model="gpt2-large")
8
 
9
  def generate_brand_identity(startup_idea):
 
 
10
  # Brand Names
11
+ prompt_name = f"Give three short, creative, and unique brand name ideas for a startup that is {startup_idea}. Avoid repetition and ensure they are realistic for a business."
12
  brand_names = generator(prompt_name, max_length=60, num_return_sequences=1)[0]["generated_text"]
13
 
14
  # Tagline
15
+ tagline_prompt = f"Generate a catchy and original tagline for a startup focused on {startup_idea}. Keep it under 10 words."
16
  tagline = generator(tagline_prompt, max_length=30, num_return_sequences=1)[0]['generated_text']
17
 
18
+ # Brand Personality
19
+ personality_prompt = f"Describe the brand personality of a startup doing {startup_idea} in one powerful sentence. Use descriptive adjectives, not vague words."
20
+ personality = generator(personality_prompt, max_length=40, num_return_sequences=1)[0]['generated_text']
21
 
22
+ # Brand Colours
23
+ colours_prompt = f"Suggest a primary and secondary brand colour with HEX codes for a startup about {startup_idea}. Format: Color Name - HEX"
24
  colours = generator(colours_prompt, max_length=40, num_return_sequences=1)[0]['generated_text']
25
 
26
+ # Target Audience
27
+ audience_prompt = f"Describe the ideal target audience (age, profession, need) for a startup doing {startup_idea}."
28
  audience = generator(audience_prompt, max_length=50, num_return_sequences=1)[0]['generated_text']
29
 
30
+ # Slogan
31
+ slogan_prompt = f"Suggest a memorable and short slogan (max 7 words) for a startup about {startup_idea}. Make it inspirational or witty."
32
+ slogan = generator(slogan_prompt, max_length=20, num_return_sequences=1)[0]['generated_text']
33
 
34
  return (
35
  brand_names.strip(),