OLIVE2403 commited on
Commit
01e11e0
·
verified ·
1 Parent(s): a717971

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -15
app.py CHANGED
@@ -16,16 +16,21 @@ generator = load_model()
16
  st.markdown(
17
  """
18
  <style>
19
- body {
20
- background-color: #f4f8fc;
21
- font-family: 'Segoe UI', sans-serif;
22
- color: #003366;
23
- }
24
- .stTextInput > div > div > input {
25
  background-color: #e6f0fa;
26
  color: #003366;
27
  font-size: 16px;
28
  }
 
 
 
 
 
 
 
 
 
 
29
  </style>
30
  """,
31
  unsafe_allow_html=True
@@ -47,7 +52,7 @@ st.markdown(
47
  # Form Input for Startup Idea
48
  with st.form("input_form"):
49
  st.subheader("📌 Describe Your Startup")
50
- startup_idea = st.text_input("Startup Idea", placeholder="e.g. an eco-friendly fish delivery platform for urban areas")
51
  submitted = st.form_submit_button("Generate")
52
 
53
  # On form submission
@@ -59,12 +64,12 @@ if submitted:
59
  st.subheader("🔍 Generated Brand Identity")
60
 
61
  prompts = {
62
- "Brand Name Suggestions": f"Suggest 5 original, non-generic brand names for a startup based on this idea: {startup_idea}. Make sure they are short, unique, and not repetitive.",
63
- "Tagline": f"Write a compelling and creative tagline for this startup. Avoid repeating the brand name. Idea: {startup_idea}",
64
- "Brand Personality Description": f"Describe in one sentence the personality of a brand that is built around the following idea: {startup_idea}. Make it lively and creative.",
65
- "Suggested Brand Colours": f"Suggest two primary and two secondary brand colours (with hex codes) that reflect the startup idea: {startup_idea}.",
66
- "Target Audience": f"Describe in 1–2 lines the ideal target audience for this startup idea: {startup_idea}.",
67
- "Slogan Options": f"Suggest three short and catchy slogans that capture the spirit of this startup: {startup_idea}. Avoid repeating phrases."
68
  }
69
 
70
  # Generate and display each section
@@ -73,7 +78,7 @@ if submitted:
73
  with st.spinner(f"Generating {section}..."):
74
  result = generator(prompt, max_length=80, num_return_sequences=1)[0]["generated_text"]
75
  st.markdown(f"### {section}")
76
- st.success(result)
77
  except Exception as e:
78
  st.markdown(f"### {section}")
79
- st.error("Error generating content. Please check your connection or try again later.")
 
16
  st.markdown(
17
  """
18
  <style>
19
+ .stTextInput>div>div>input {
 
 
 
 
 
20
  background-color: #e6f0fa;
21
  color: #003366;
22
  font-size: 16px;
23
  }
24
+ .stButton>button {
25
+ background-color: #4A90E2;
26
+ color: white;
27
+ border-radius: 8px;
28
+ font-size: 16px;
29
+ padding: 10px 16px;
30
+ }
31
+ .stButton>button:hover {
32
+ background-color: #357ABD;
33
+ }
34
  </style>
35
  """,
36
  unsafe_allow_html=True
 
52
  # Form Input for Startup Idea
53
  with st.form("input_form"):
54
  st.subheader("📌 Describe Your Startup")
55
+ startup_idea = st.text_area("Startup Idea", placeholder="e.g. an eco-friendly fish delivery platform for urban areas")
56
  submitted = st.form_submit_button("Generate")
57
 
58
  # On form submission
 
64
  st.subheader("🔍 Generated Brand Identity")
65
 
66
  prompts = {
67
+ "Brand Name Suggestions": f"Suggest 5 short, smart, brandable names for this startup. Avoid generic or repeated words. Idea: {startup_idea}",
68
+ "Tagline": f"Give a single compelling tagline without repeating 'coaching', 'e-learning', or 'startup'. Use the idea: {startup_idea}",
69
+ "Brand Personality Description": f"Describe the brand's personality in 1 creative sentence. Avoid clichés. Based on: {startup_idea}",
70
+ "Suggested Brand Colours": f"Suggest a unique pair of primary and secondary brand colours with HEX codes for this startup: {startup_idea}",
71
+ "Target Audience": f"Describe the target audience clearly and concisely (age, interests, needs) for: {startup_idea}",
72
+ "Slogan Options": f"Give 3 short, catchy slogans that creatively reflect this idea: {startup_idea}. Avoid repetition or generic words."
73
  }
74
 
75
  # Generate and display each section
 
78
  with st.spinner(f"Generating {section}..."):
79
  result = generator(prompt, max_length=80, num_return_sequences=1)[0]["generated_text"]
80
  st.markdown(f"### {section}")
81
+ st.success(result.strip())
82
  except Exception as e:
83
  st.markdown(f"### {section}")
84
+ st.error("Error generating content. Please check your connection or try again later.")