Commit
Β·
746a499
1
Parent(s):
2e3d958
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,80 +11,18 @@ warnings.filterwarnings("ignore")
|
|
| 11 |
# Set your OpenAI API key
|
| 12 |
openai.api_key = "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"
|
| 13 |
|
| 14 |
-
# CSS styling for improved visuals
|
| 15 |
-
st.markdown(
|
| 16 |
-
"""
|
| 17 |
-
<style>
|
| 18 |
-
.st-eb {
|
| 19 |
-
padding: 0.5rem;
|
| 20 |
-
background-color: #b1ddf1;
|
| 21 |
-
border-radius: 5px;
|
| 22 |
-
}
|
| 23 |
-
.st-br {
|
| 24 |
-
margin-top: 1rem;
|
| 25 |
-
margin-bottom: 1rem;
|
| 26 |
-
}
|
| 27 |
-
</style>
|
| 28 |
-
""",
|
| 29 |
-
unsafe_allow_html=True,
|
| 30 |
-
)
|
| 31 |
-
|
| 32 |
# Streamlit app title and header with improved styling
|
| 33 |
st.title("π PowerPoint Presentation Generator π")
|
| 34 |
st.markdown("<h1 style='text-align: center; color: white;'>Welcome to the Future of Presentation Creation!</h1>", unsafe_allow_html=True)
|
| 35 |
|
| 36 |
-
# Introduction section with improved styling and details
|
| 37 |
-
st.markdown(
|
| 38 |
-
"""
|
| 39 |
-
<div class="st-eb">
|
| 40 |
-
<p style="color: black;">Creating presentations has never been this easy and exciting! With our AI-powered model, you can quickly generate presentation content, while the design remains your creative canvas. π¨</p>
|
| 41 |
-
<p style="color: black;">Here's what we do:</p>
|
| 42 |
-
<ul>
|
| 43 |
-
<li style="color: black;"><strong>You provide the presentation topic</strong>, and we add captivating content.</li>
|
| 44 |
-
<li style="color: black;">Our AI ensures <strong>each slide has the perfect balance of information</strong>.</li>
|
| 45 |
-
<li style="color: black;">Stay tuned for <strong>exciting future features</strong> that will enhance your presentation experience. π</li>
|
| 46 |
-
</ul>
|
| 47 |
-
</div>
|
| 48 |
-
""",
|
| 49 |
-
unsafe_allow_html=True,
|
| 50 |
-
)
|
| 51 |
-
|
| 52 |
-
# Presentation Limits section with improved styling and details
|
| 53 |
-
st.markdown("<h2>Presentation Limits</h2>", unsafe_allow_html=True)
|
| 54 |
-
st.markdown(
|
| 55 |
-
"""
|
| 56 |
-
<div class="st-eb">
|
| 57 |
-
<p style="color: black;">β¨ You can create a minimum of 3 and a maximum of 7 slides per presentation.</p>
|
| 58 |
-
<p style="color: black;">β¨ Each slide should have between 3 and 7 points of content.</p>
|
| 59 |
-
<p style="color: black;">β¨ Minimum 3 points, maximum 7 points. β οΈ</p>
|
| 60 |
-
</div>
|
| 61 |
-
""",
|
| 62 |
-
unsafe_allow_html=True,
|
| 63 |
-
)
|
| 64 |
-
|
| 65 |
-
# Important Notice with improved styling
|
| 66 |
-
st.warning("β οΈ Important Notice: THERE IS NO API KEY SO ADD YOUR OWN CHATGPT3.5 API TO MAKE PROJECT RUN ")
|
| 67 |
-
|
| 68 |
-
# Contact and Feedback section with improved styling
|
| 69 |
-
st.markdown("<h2>Contact and Feedback</h2>", unsafe_allow_html=True)
|
| 70 |
-
st.markdown(
|
| 71 |
-
"""
|
| 72 |
-
<div class="st-eb">
|
| 73 |
-
<p style="color: black;">Have questions, ideas, or cool suggestions for future enhancements? We're all ears!</p>
|
| 74 |
-
<p style="color: black;">Your feedback is invaluable in making your experience the best it can be! π</p>
|
| 75 |
-
</div>
|
| 76 |
-
""",
|
| 77 |
-
unsafe_allow_html=True,
|
| 78 |
-
)
|
| 79 |
-
|
| 80 |
# User Input Section with clickable options
|
| 81 |
presentation_title = st.text_input("π Enter your presentation topic:")
|
| 82 |
|
| 83 |
-
# Predefined topics
|
| 84 |
predefined_topics = ["Artificial Intelligence", "Blockchain Technology", "Space Exploration", "Climate Change", "Future of Work"]
|
| 85 |
|
| 86 |
-
# Display clickable options for predefined topics
|
| 87 |
-
selected_topic = st.radio("π Choose a predefined topic or enter your own:", ["Select"] + predefined_topics)
|
| 88 |
|
| 89 |
# If a predefined topic is selected, set it as the input
|
| 90 |
if selected_topic != "Select":
|
|
|
|
| 11 |
# Set your OpenAI API key
|
| 12 |
openai.api_key = "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"
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Streamlit app title and header with improved styling
|
| 15 |
st.title("π PowerPoint Presentation Generator π")
|
| 16 |
st.markdown("<h1 style='text-align: center; color: white;'>Welcome to the Future of Presentation Creation!</h1>", unsafe_allow_html=True)
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# User Input Section with clickable options
|
| 19 |
presentation_title = st.text_input("π Enter your presentation topic:")
|
| 20 |
|
| 21 |
+
# Predefined topics (hidden from the user)
|
| 22 |
predefined_topics = ["Artificial Intelligence", "Blockchain Technology", "Space Exploration", "Climate Change", "Future of Work"]
|
| 23 |
|
| 24 |
+
# Display clickable options for predefined topics (hidden)
|
| 25 |
+
selected_topic = st.radio("π Choose a predefined topic or enter your own:", ["Select"] + predefined_topics, index=0)
|
| 26 |
|
| 27 |
# If a predefined topic is selected, set it as the input
|
| 28 |
if selected_topic != "Select":
|