Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,16 +16,21 @@ generator = load_model()
|
|
| 16 |
st.markdown(
|
| 17 |
"""
|
| 18 |
<style>
|
| 19 |
-
|
| 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.
|
| 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
|
| 63 |
-
"Tagline": f"
|
| 64 |
-
"Brand Personality Description": f"Describe
|
| 65 |
-
"Suggested Brand Colours": f"Suggest
|
| 66 |
-
"Target Audience": f"Describe
|
| 67 |
-
"Slogan Options": f"
|
| 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.")
|