This commit is contained in:
2026-02-06 10:12:24 +03:00
parent 801844807e
commit 834f21bb28
12 changed files with 1438 additions and 1181 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
jokes_bot/.DS_Store vendored

Binary file not shown.

View File

@@ -36,7 +36,7 @@ Let's create a folder on your Desktop for easy access:
```bash ```bash
# Go to Desktop (Windows) # Go to Desktop (Windows)
cd Desktop cd Document
# Create a new folder for your project # Create a new folder for your project
mkdir project_folder mkdir project_folder

Binary file not shown.

View File

@@ -1,969 +0,0 @@
<!DOCTYPE html>
<!-- saved from url=(0063)file:///Users/home/Downloads/deepseek_html_20260130_cd57ee.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Joke Bot v2 - Community Ratings Added!</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f8f9fa;
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 10px;
}
.container {
flex: 1;
display: flex;
flex-direction: column;
max-width: 1000px;
margin: 0 auto;
width: 100%;
height: calc(100vh - 60px);
}
.slide {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 30px 40px;
margin: 10px 0;
display: none;
flex: 1;
overflow-y: auto;
max-height: 82vh;
min-height: 400px;
}
.slide.active {
display: flex;
flex-direction: column;
}
h1 {
color: #2c3e50;
font-size: 2.2rem;
margin-bottom: 15px;
text-align: center;
font-weight: 600;
}
h2 {
color: #2c3e50;
font-size: 1.8rem;
margin-bottom: 20px;
text-align: center;
font-weight: 600;
}
h3 {
color: #2c3e50;
font-size: 1.4rem;
margin-bottom: 15px;
}
.lesson-title {
color: #2980b9;
font-size: 1.8rem;
margin-bottom: 10px;
text-align: center;
font-weight: 600;
}
.subject-topic {
color: #27ae60;
font-size: 1.5rem;
margin-bottom: 10px;
text-align: center;
font-weight: 600;
}
.subject-title {
text-align: center;
color: #7f8c8d;
font-size: 1.2rem;
margin-bottom: 30px;
font-style: italic;
}
p {
font-size: 1.1rem;
line-height: 1.6;
margin: 15px 0;
color: #34495e;
}
ul, ol {
margin: 15px 0 20px 30px;
font-size: 1.1rem;
line-height: 1.6;
color: #34495e;
}
li {
margin: 10px 0;
}
.rules-container {
background-color: #f8f9fa;
border-radius: 6px;
padding: 25px;
margin: 20px 0;
border-left: 4px solid #3498db;
}
.outcomes-container {
background-color: #e8f4fd;
border-radius: 6px;
padding: 25px;
margin: 20px 0;
}
.why-container {
background-color: #f0f7ff;
border-radius: 6px;
padding: 25px;
margin: 20px 0;
}
.content-container {
margin: 20px 0;
}
.terminal {
background-color: #2c3e50;
color: #ecf0f1;
padding: 20px;
border-radius: 6px;
font-family: 'Courier New', monospace;
margin: 20px 0;
font-size: 1rem;
line-height: 1.5;
white-space: pre-wrap;
word-wrap: break-word;
}
.terminal-command {
color: #2ecc71;
}
.terminal-comment {
color: #95a5a6;
font-style: italic;
}
.button-container {
display: flex;
justify-content: space-between;
margin-top: auto;
padding-top: 20px;
border-top: 1px solid #eee;
}
button {
background-color: #3498db;
color: white;
border: none;
padding: 10px 20px;
font-size: 1rem;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.2s;
font-weight: 500;
min-width: 120px;
}
button:hover {
background-color: #2980b9;
}
button:disabled {
background-color: #bdc3c7;
cursor: not-allowed;
}
.slide-counter {
text-align: center;
color: #7f8c8d;
font-size: 1rem;
margin-bottom: 10px;
font-weight: 500;
}
.lead {
font-size: 1.2rem;
color: #7f8c8d;
text-align: center;
margin-bottom: 20px;
}
code {
background-color: #f1f2f3;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.95rem;
}
.feature-box {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
.ai-icon {
font-size: 2rem;
text-align: center;
margin: 10px 0;
}
.sentiment-demo {
display: flex;
justify-content: space-around;
margin: 20px 0;
}
.sentiment-item {
text-align: center;
padding: 15px;
border-radius: 8px;
flex: 1;
margin: 0 10px;
}
.positive {
background-color: #d4edda;
border: 2px solid #c3e6cb;
color: #155724;
}
.neutral {
background-color: #fff3cd;
border: 2px solid #ffeaa7;
color: #856404;
}
.negative {
background-color: #f8d7da;
border: 2px solid #f5c6cb;
color: #721c24;
}
.simple-explanation {
background-color: #e8f4fd;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
border-left: 5px solid #3498db;
}
.simple-explanation h3 {
color: #2980b9;
}
.analogy-box {
background-color: #fff3cd;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
border: 2px dashed #f39c12;
}
.cool-fact {
background-color: #d5f4e6;
padding: 15px;
border-radius: 8px;
margin: 15px 0;
border-left: 4px solid #27ae60;
}
.comparison-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.comparison-table th, .comparison-table td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.comparison-table th {
background-color: #3498db;
color: white;
}
.comparison-table tr:nth-child(even) {
background-color: #f2f2f2;
}
.database-diagram {
background-color: #f8f9fa;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
border: 2px solid #3498db;
font-family: monospace;
line-height: 1.8;
}
.rating-demo {
display: flex;
justify-content: center;
gap: 20px;
margin: 20px 0;
}
.rating-button {
font-size: 2rem;
padding: 15px;
border-radius: 10px;
cursor: pointer;
transition: transform 0.2s;
}
.rating-button:hover {
transform: scale(1.2);
}
.upvote {
background-color: #d4edda;
color: #28a745;
}
.neutral-vote {
background-color: #fff3cd;
color: #ffc107;
}
.downvote {
background-color: #f8d7da;
color: #dc3545;
}
.community-box {
background-color: #e3f2fd;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
border: 2px solid #2196f3;
}
@media (max-width: 768px) {
body {
padding: 5px;
}
.container {
height: calc(100vh - 40px);
}
.slide {
padding: 20px 25px;
min-height: 300px;
}
h1 {
font-size: 1.8rem;
}
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.2rem;
}
.lesson-title {
font-size: 1.5rem;
}
.subject-topic {
font-size: 1.3rem;
}
p, ul, ol {
font-size: 1rem;
}
button {
padding: 8px 16px;
font-size: 0.95rem;
min-width: 100px;
}
.sentiment-demo, .rating-demo {
flex-direction: column;
gap: 10px;
}
.sentiment-item {
margin: 10px 0;
}
}
</style>
</head>
<body>
<div class="slide-counter" id="slide-counter">Slide 1 of 12</div>
<div class="container">
<!-- Slide 1: Title Slide -->
<div class="slide active" id="slide1">
<div style="flex: 1; display: flex; flex-direction: column; justify-content: center;">
<div class="ai-icon">🤖✨</div>
<div class="lesson-title">Joke Bot v2.0 Launch!</div>
<div class="subject-topic">AI + Community = Super Smart Bot!</div>
<div class="subject-title">Now with community ratings and smarter AI!</div>
</div>
<div class="button-container">
<button id="prevBtn1" disabled="">Previous</button>
<button id="nextBtn1">Next</button>
</div>
</div>
<!-- Slide 2: Rules -->
<div class="slide" id="slide2">
<h2>Class Rules</h2>
<div class="rules-container">
<h3>How to Earn Points Today:</h3>
<p><strong>+2 Points</strong> - You're here and ready to learn!</p>
<p><strong>+1 Point</strong> - You listen during instruction</p>
<p><strong>+1 Point</strong> - You try all the activities</p>
<p><strong>+1 Point</strong> - You complete all the work</p>
<div class="cool-fact">
<p><strong>✨ Cool Fact:</strong> You helped build this bot! Your ratings make it smarter!</p>
</div>
</div>
<div class="button-container">
<button id="prevBtn2" disabled="">Previous</button>
<button id="nextBtn2">Next</button>
</div>
</div>
<!-- Slide 3: Learning Outcomes -->
<div class="slide" id="slide3">
<h2>What's New in v2.0?</h2>
<p class="subject-title">Our joke bot got a MAJOR upgrade!</p>
<div class="outcomes-container">
<ol>
<li><strong>🎭 Community Voting:</strong> Rate jokes with 👍, 👎, or 😐</li>
<li><strong>🧠 AI vs Humans:</strong> Compare computer guesses with real votes</li>
<li><strong>🗳️ Many-to-One:</strong> Many people can rate each joke</li>
<li><strong>📊 Smart Statistics:</strong> See what jokes are REALLY popular</li>
<li><strong>💾 Database Upgrade:</strong> New table for storing all votes</li>
</ol>
</div>
<div class="analogy-box">
<p><strong>🎮 Think of it like this:</strong> Our joke bot was good, but now it's like adding multiplayer mode to a game!</p>
</div>
<div class="button-container">
<button id="prevBtn3" disabled="">Previous</button>
<button id="nextBtn3">Next</button>
</div>
</div>
<!-- Slide 4: The Big Upgrade -->
<div class="slide" id="slide4">
<h2>The Big Upgrade: Community Ratings!</h2>
<div class="simple-explanation">
<h3>v1.0: Just AI Guesses</h3>
<p>Old system: Only the computer guessed if jokes were funny.</p>
<div class="sentiment-demo">
<div class="sentiment-item positive">
<h4>AI Says: 😊 Positive</h4>
<p>"Why don't eggs tell jokes?"</p>
<small>Score: +0.90</small>
</div>
</div>
</div>
<div class="feature-box">
<h3>v2.0: AI + REAL People!</h3>
<p>New system: Both computer AND humans vote on jokes!</p>
<div class="rating-demo">
<div class="rating-button upvote">👍 85%</div>
<div class="rating-button neutral-vote">😐 10%</div>
<div class="rating-button downvote">👎 5%</div>
</div>
<p><strong>Example Joke:</strong> "Why don't scientists trust atoms?"</p>
<p><strong>AI Thinks:</strong> 😊 Positive (Score: +0.75)</p>
<p><strong>Community Says:</strong> 👍 92% funny! (46 votes)</p>
</div>
<div class="cool-fact">
<p><strong>🤯 Mind Blown Fact:</strong> This is how YouTube, TikTok, and Netflix work - they combine AI guesses with real user ratings!</p>
</div>
<div class="button-container">
<button id="prevBtn4" disabled="">Previous</button>
<button id="nextBtn4">Next</button>
</div>
</div>
<!-- Slide 5: How It Works Now -->
<div class="slide" id="slide5">
<h2>Try It Yourself! 🎯</h2>
<div class="simple-explanation">
<h3>Step-by-Step Demo:</h3>
<ol>
<li><strong>Step 1:</strong> Bot shows you a joke</li>
<li><strong>Step 2:</strong> You see AI's guess (😊/😐/😒)</li>
<li><strong>Step 3:</strong> YOU get to vote! 👍, 👎, or 😐</li>
<li><strong>Step 4:</strong> Your vote gets saved with everyone else's</li>
<li><strong>Step 5:</strong> Next person sees the community score</li>
</ol>
</div>
<div class="community-box">
<h3>📱 What You See Now:</h3>
<div style="background-color: #2c3e50; color: white; padding: 20px; border-radius: 8px; margin: 15px 0;">
<p>🤣 "Why don't eggs tell jokes? They'd crack each other up!"</p>
<p>🤖 AI Mood: 😊 Positive (Score: +0.90)</p>
<p>👥 Community Rating: 👍 85% | 😐 10% | 👎 5%</p>
<p>🗳️ 124 people voted</p>
<hr style="margin: 15px 0; border-color: #444;">
<p><strong>Was this joke funny to YOU?</strong></p>
<p>1. 👍 Upvote 2. 😐 Neutral 3. 👎 Downvote</p>
</div>
</div>
<div class="analogy-box">
<p><strong>💡 This is like:</strong> YouTube comments + TikTok likes + Netflix ratings all in one joke bot!</p>
</div>
<div class="button-container">
<button id="prevBtn5" disabled="">Previous</button>
<button id="nextBtn5">Next</button>
</div>
</div>
<!-- Slide 6: Database Upgrade -->
<div class="slide" id="slide6">
<h2>Behind the Scenes: Database Magic 🗄️</h2>
<div class="simple-explanation">
<h3>OLD Database (v1.0):</h3>
<div class="database-diagram">
jokes table:
├── id
├── joke_text
├── contributor
├── published_date
├── ai_score ← Only AI's guess
└── ai_mood_label
</div>
</div>
<div class="feature-box">
<h3>NEW Database (v2.0):</h3>
<div class="database-diagram" style="background-color: #e8f4fd; border-color: #2196f3;">
jokes table: user_sentiments table:
├── id ├── id
├── joke_text ├── joke_id → Links to jokes
├── contributor ├── user_name
├── published_date ├── sentiment → 'up','down','neutral'
├── ai_score ← AI's guess └── timestamp
└── ai_mood_label └── ← MANY votes per joke!
</div>
</div>
<div class="analogy-box">
<h3>🧩 Many-to-One Relationship:</h3>
<ul>
<li><strong>One Joke</strong> can have <strong>MANY votes</strong></li>
<li>Like one YouTube video → many likes/comments</li>
<li>Like one TikTok → many hearts</li>
<li>This is called a "foreign key" relationship</li>
</ul>
</div>
<div class="button-container">
<button id="prevBtn6" disabled="">Previous</button>
<button id="nextBtn6">Next</button>
</div>
</div>
<!-- Slide 7: The New Code -->
<div class="slide" id="slide7">
<h2>The Smart New Code ✨</h2>
<div class="content-container">
<h3>1. New Database Table:</h3>
<div class="terminal">
<span class="terminal-command">CREATE TABLE user_sentiments (</span>
id INTEGER PRIMARY KEY,
joke_id INTEGER, <span class="terminal-comment"># Which joke</span>
user_name TEXT, <span class="terminal-comment"># Who voted</span>
sentiment TEXT, <span class="terminal-comment"># 'up','down','neutral'</span>
timestamp TEXT, <span class="terminal-comment"># When they voted</span>
FOREIGN KEY (joke_id) REFERENCES jokes(id) <span class="terminal-comment"># The magic link!</span>
<span class="terminal-command">);</span>
</div>
<h3>2. Asking for Your Vote:</h3>
<div class="terminal">
<span class="terminal-comment"># After showing a joke...</span>
print("🤣 Why don't eggs tell jokes? They'd crack each other up!")
print("🤖 AI thinks: 😊 Positive (Score: +0.90)")
<span class="terminal-comment"># Get community rating</span>
<span class="terminal-command">community_score = get_community_rating(joke_id)</span>
print(f"👥 Community: 👍 {community_score['up']}%")
<span class="terminal-comment"># Ask for YOUR vote!</span>
print("🗳️ Was this funny to YOU?")
print("1. 👍 Upvote 2. 😐 Neutral 3. 👎 Downvote")
<span class="terminal-command">user_choice = input("Your choice: ")</span>
<span class="terminal-comment"># Save your vote</span>
<span class="terminal-command">save_user_vote(joke_id, your_name, user_choice)</span>
</div>
</div>
<div class="cool-fact">
<p><strong>⚡ Pro Tip:</strong> The "FOREIGN KEY" is what links votes to specific jokes. It's like adding @mentions in social media!</p>
</div>
<div class="button-container">
<button id="prevBtn7" disabled="">Previous</button>
<button id="nextBtn7">Next</button>
</div>
</div>
<!-- Slide 8: AI vs Humans - The Battle! -->
<div class="slide" id="slide8">
<h2>AI vs Humans - The Showdown! 🥊</h2>
<div class="simple-explanation">
<h3>Now We Can Compare:</h3>
<table class="comparison-table">
<tbody><tr>
<th>Joke</th>
<th>🤖 AI Guesses</th>
<th>👥 Humans Vote</th>
<th>Who's Right?</th>
</tr>
<tr>
<td>"Why don't scientists trust atoms?"</td>
<td>😊 Positive (+0.75)</td>
<td>👍 92% funny</td>
<td>✅ Both agree!</td>
</tr>
<tr>
<td>"Parallel lines have so much in common..."</td>
<td>😒 Negative (-0.35)</td>
<td>👍 78% funny</td>
<td>❌ AI wrong!</td>
</tr>
<tr>
<td>"I told my computer I needed a break..."</td>
<td>😐 Neutral (0.05)</td>
<td>👎 65% not funny</td>
<td>❌ AI wrong!</td>
</tr>
</tbody></table>
</div>
<div class="analogy-box">
<h3>🎯 What This Teaches Us:</h3>
<ul>
<li><strong>AI gets it right sometimes</strong> - Good at obvious jokes</li>
<li><strong>AI gets it wrong sometimes</strong> - Bad at sarcasm/complex jokes</li>
<li><strong>Humans are better judges</strong> - We understand context</li>
<li><strong>Community voting is powerful</strong> - Wisdom of the crowd!</li>
</ul>
</div>
<div class="cool-fact">
<p><strong>🧠 Real AI Learning:</strong> Some AI systems use human votes like this to LEARN and get better! Your votes could train future AI!</p>
</div>
<div class="button-container">
<button id="prevBtn8" disabled="">Previous</button>
<button id="nextBtn8">Next</button>
</div>
</div>
<!-- Slide 9: Real-World Examples -->
<div class="slide" id="slide9">
<h2>Where You've Seen This Before 🎬</h2>
<div class="simple-explanation">
<h3>Everywhere! This is how real apps work:</h3>
<div class="sentiment-demo">
<div class="sentiment-item positive" style="text-align: left;">
<h4>📱 YouTube</h4>
<p>👍👎 buttons</p>
<p>Comments + AI recommendations</p>
<small>Exactly like our joke bot!</small>
</div>
<div class="sentiment-item neutral" style="text-align: left;">
<h4>📸 TikTok/Instagram</h4>
<p>❤️ hearts = upvotes</p>
<p>AI suggests videos you'll like</p>
<small>Community + AI working together</small>
</div>
<div class="sentiment-item negative" style="text-align: left;">
<h4>🎮 Online Games</h4>
<p>Report systems</p>
<p>Player ratings</p>
<small>Community moderation</small>
</div>
</div>
</div>
<div class="community-box">
<h3>🎯 The Big Idea:</h3>
<p><strong>Modern apps = AI + Community Feedback</strong></p>
<ul>
<li><strong>AI starts the guess</strong> (like our TextBlob sentiment)</li>
<li><strong>Humans give feedback</strong> (your 👍/👎 votes)</li>
<li><strong>System gets smarter</strong> (learns from both)</li>
<li><strong>Better experience for everyone!</strong></li>
</ul>
</div>
<div class="cool-fact">
<p><strong>🚀 Career Connection:</strong> Knowing how to build AI + community systems is a SUPER valuable skill for app developers!</p>
</div>
<div class="button-container">
<button id="prevBtn9" disabled="">Previous</button>
<button id="nextBtn9">Next</button>
</div>
</div>
<!-- Slide 10: What You Built -->
<div class="slide" id="slide10">
<h2>What YOU Built Today 🏗️</h2>
<div class="content-container">
<p>Think about it - you helped build a system that:</p>
<ol>
<li><strong>🤖 Uses AI</strong> to analyze text feelings</li>
<li><strong>🗳️ Collects community votes</strong> from real people</li>
<li><strong>💾 Stores everything</strong> in a smart database</li>
<li><strong>🔗 Links votes to jokes</strong> with foreign keys</li>
<li><strong>📊 Shows statistics</strong> comparing AI vs humans</li>
</ol>
<div class="feature-box">
<p><strong>🌟 That's Professional-Level Work!</strong></p>
<p>Companies build apps the exact same way:</p>
<ul>
<li>YouTube = videos + likes/dislikes</li>
<li>Amazon = products + star ratings</li>
<li>Netflix = shows + thumbs up/down</li>
<li><strong>Our Joke Bot = jokes + 👍/👎 ratings!</strong></li>
</ul>
</div>
<div class="analogy-box">
<p><strong>💪 You're Not Just Learning - You're Building Real Stuff!</strong></p>
<p>The skills you learned today (AI + databases + user feedback) are exactly what tech companies look for!</p>
</div>
</div>
<div class="button-container">
<button id="prevBtn10" disabled="">Previous</button>
<button id="nextBtn10">Next</button>
</div>
</div>
<!-- Slide 11: Next Steps & Ideas -->
<div class="slide" id="slide11">
<h2>What Could We Build Next? 🚀</h2>
<div class="content-container">
<h3>Discussion Time:</h3>
<ul>
<li>What jokes did the AI get totally wrong? Why?</li>
<li>Should some people's votes count more? (Like joke experts?)</li>
<li>What if we could "train" the AI with our votes?</li>
<li>Could we predict which jokes will be popular?</li>
</ul>
<div class="analogy-box">
<h3>🎯 Cool Extension Ideas:</h3>
<ul>
<li><strong>Personalized Jokes:</strong> "Show me jokes that people LIKE ME enjoyed!"</li>
<li><strong>Joke Leaderboard:</strong> Top 10 most-liked jokes</li>
<li><strong>AI Trainer:</strong> Use votes to make TextBlob smarter</li>
<li><strong>Meme Version:</strong> Same system but for memes!</li>
<li><strong>Class Poll System:</strong> Use this code for classroom votes</li>
</ul>
</div>
<div class="community-box">
<h3>🧠 The Real Magic:</h3>
<p>You now have a template for ANY voting system:</p>
<p>Song ratings, game reviews, teacher feedback, club elections...</p>
<p><strong>Change the jokes to something else, keep the voting system!</strong></p>
</div>
</div>
<div class="button-container">
<button id="prevBtn11" disabled="">Previous</button>
<button id="nextBtn11">Next</button>
</div>
</div>
<!-- Slide 12: Thank You -->
<div class="slide" id="slide12">
<div class="content-container">
<div class="ai-icon">🤖👥✨</div>
<h1>You Built Version 2.0!</h1>
<div class="analogy-box">
<p><strong>🎯 Remember What You Accomplished:</strong></p>
<ul>
<li>Started with basic joke storage (v1.0)</li>
<li>Added AI mood detection (v1.5)</li>
<li>Now added COMMUNITY voting (v2.0!)</li>
<li>You built a system used by billion-dollar companies</li>
<li>You understand AI + Human collaboration</li>
</ul>
</div>
<div class="cool-fact">
<p><strong>📈 Career Superpower:</strong> You now know how to build interactive, community-driven, AI-enhanced apps. That's literally what modern software development is all about!</p>
</div>
<p style="margin-top: 30px;"><strong>Next Challenge:</strong> Can we make the AI LEARN from our votes? 🤔</p>
<p style="margin-top: 30px; color: #7f8c8d;">
ICT &amp; Digital Technologies<br>
Year 9 - Building Real Apps
</p>
</div>
<div class="button-container">
<button id="prevBtn12" disabled="">Previous</button>
<button id="nextBtn12">Next</button>
</div>
</div>
</div>
<script>
// ==================== CONFIGURATION ====================
const totalSlides = 12;
// =======================================================
let currentSlide = 1;
// Update slide counter
function updateSlideCounter() {
document.getElementById('slide-counter').textContent = `Slide ${currentSlide} of ${totalSlides}`;
}
// Slide navigation
function showSlide(slideNumber) {
// Hide all slides
for (let i = 1; i <= totalSlides; i++) {
const slide = document.getElementById(`slide${i}`);
if (slide) {
slide.classList.remove('active');
}
}
// Show current slide
const currentSlideElement = document.getElementById(`slide${slideNumber}`);
if (currentSlideElement) {
currentSlideElement.classList.add('active');
currentSlide = slideNumber;
updateSlideCounter();
// Update button states
updateButtons();
}
}
function updateButtons() {
// Update previous button
const prevButtons = document.querySelectorAll('[id^="prevBtn"]');
prevButtons.forEach(btn => {
btn.disabled = currentSlide === 1;
});
// Update next button text on last slide
const nextButtons = document.querySelectorAll('[id^="nextBtn"]');
nextButtons.forEach(btn => {
if (currentSlide === totalSlides) {
btn.textContent = 'Mission Complete! 🎉';
} else {
btn.textContent = 'Next';
}
});
}
// Next button functionality
document.querySelectorAll('[id^="nextBtn"]').forEach(button => {
button.addEventListener('click', () => {
if (currentSlide < totalSlides) {
showSlide(currentSlide + 1);
} else {
// Last slide - completion message
alert('🎉 INCREDIBLE WORK! You understand AI + Community systems - exactly how real apps work! Keep building amazing things! 🚀');
}
});
});
// Previous button functionality
document.querySelectorAll('[id^="prevBtn"]').forEach(button => {
button.addEventListener('click', () => {
if (currentSlide > 1) {
showSlide(currentSlide - 1);
}
});
});
// Initialize the presentation
updateSlideCounter();
updateButtons();
// Keyboard navigation
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowRight' || e.key === ' ' || e.key === 'PageDown') {
if (currentSlide < totalSlides) {
showSlide(currentSlide + 1);
}
} else if (e.key === 'ArrowLeft' || e.key === 'PageUp') {
if (currentSlide > 1) {
showSlide(currentSlide - 1);
}
}
});
// Initialize to first slide
showSlide(1);
</script>
</body></html>

View File

@@ -1,22 +1,22 @@
-- Insert 20 dummy jokes with various sentiments -- Insert 20 dummy jokes with various sentiments
INSERT INTO jokes (joke, contributor, published, sentiment_score, sentiment_label) VALUES INSERT INTO jokes (joke, contributor, created_date, approved, sentiment_score, sentiment_label) VALUES
('Why don''t scientists trust atoms? Because they make up everything!', 'ScienceFan', '2024-01-15 10:30:00', 0.75, '😊 Positive'), ('Why don''t scientists trust atoms? Because they make up everything!', 'ScienceFan', '2024-01-15 10:30:00', 1, 0.75, '😊 Positive'),
('I told my wife she was drawing her eyebrows too high. She looked surprised.', 'Joker123', '2024-01-16 14:20:00', 0.35, '😊 Positive'), ('I told my wife she was drawing her eyebrows too high. She looked surprised.', 'Joker123', '2024-01-16 14:20:00', 1, 0.35, '😊 Positive'),
('Why did the scarecrow win an award? He was outstanding in his field!', 'FarmLife', '2024-01-17 09:15:00', 0.65, '😊 Positive'), ('Why did the scarecrow win an award? He was outstanding in his field!', 'FarmLife', '2024-01-17 09:15:00', 1, 0.65, '😊 Positive'),
('What do you call a fish with no eyes? Fsh!', 'MarineBio', '2024-01-18 16:45:00', 0.25, '😊 Positive'), ('What do you call a fish with no eyes? Fsh!', 'MarineBio', '2024-01-18 16:45:00', 1, 0.25, '😊 Positive'),
('I''m reading a book on anti-gravity. It''s impossible to put down!', 'PhysicsNerd', '2024-01-19 11:30:00', 0.45, '😊 Positive'), ('I''m reading a book on anti-gravity. It''s impossible to put down!', 'PhysicsNerd', '2024-01-19 11:30:00', 1, 0.45, '😊 Positive'),
('Why did the computer go to the doctor? Because it had a virus.', 'TechSupport', '2024-01-20 13:10:00', 0.05, '😐 Neutral'), ('Why did the computer go to the doctor? Because it had a virus.', 'TechSupport', '2024-01-20 13:10:00', 1, 0.05, '😐 Neutral'),
('What do you call a bear with no teeth? A gummy bear.', 'WildlifeFan', '2024-01-21 15:25:00', 0.08, '😐 Neutral'), ('What do you call a bear with no teeth? A gummy bear.', 'WildlifeFan', '2024-01-21 15:25:00', 1, 0.08, '😐 Neutral'),
('Why did the bicycle fall over? Because it was two-tired.', 'Cyclist', '2024-01-22 10:00:00', -0.02, '😐 Neutral'), ('Why did the bicycle fall over? Because it was two-tired.', 'Cyclist', '2024-01-22 10:00:00', 1, -0.02, '😐 Neutral'),
('What do you call a sleeping bull? A bulldozer.', 'Cowboy', '2024-01-23 14:35:00', 0.03, '😐 Neutral'), ('What do you call a sleeping bull? A bulldozer.', 'Cowboy', '2024-01-23 14:35:00', 1, 0.03, '😐 Neutral'),
('Why did the math book look so sad? Because it had too many problems.', 'Student', '2024-01-24 09:50:00', -0.05, '😐 Neutral'), ('Why did the math book look so sad? Because it had too many problems.', 'Student', '2024-01-24 09:50:00', 1, -0.05, '😐 Neutral'),
('I used to play piano by ear, but now I use my hands.', 'Musician', '2024-01-25 12:15:00', -0.15, '😒 Negative'), ('I used to play piano by ear, but now I use my hands.', 'Musician', '2024-01-25 12:15:00', 1, -0.15, '😒 Negative'),
('I told my computer I needed a break, and now it won''t stop sending me Kit-Kat ads.', 'OfficeWorker', '2024-01-26 16:30:00', -0.25, '😒 Negative'), ('I told my computer I needed a break, and now it won''t stop sending me Kit-Kat ads.', 'OfficeWorker', '2024-01-26 16:30:00', 1, -0.25, '😒 Negative'),
('Parallel lines have so much in common. It''s a shame they''ll never meet.', 'MathTeacher', '2024-01-27 11:40:00', -0.35, '😒 Negative'), ('Parallel lines have so much in common. It''s a shame they''ll never meet.', 'MathTeacher', '2024-01-27 11:40:00', 1, -0.35, '😒 Negative'),
('My wife told me to stop impersonating a flamingo. I had to put my foot down.', 'Husband', '2024-01-28 14:55:00', -0.20, '😒 Negative'), ('My wife told me to stop impersonating a flamingo. I had to put my foot down.', 'Husband', '2024-01-28 14:55:00', 1, -0.20, '😒 Negative'),
('I told my girlfriend she drew her eyebrows too high. She seemed surprised.', 'Boyfriend', '2024-01-29 10:10:00', -0.30, '😒 Negative'), ('I told my girlfriend she drew her eyebrows too high. She seemed surprised.', 'Boyfriend', '2024-01-29 10:10:00', 1, -0.30, '😒 Negative'),
('What''s orange and sounds like a parrot? A carrot!', 'Vegetarian', '2024-01-30 13:20:00', 0.85, '😊 Positive'), ('What''s orange and sounds like a parrot? A carrot!', 'Vegetarian', '2024-01-30 13:20:00', 1, 0.85, '😊 Positive'),
('Why don''t eggs tell jokes? They''d crack each other up!', 'Chef', '2024-01-31 15:45:00', 0.90, '😊 Positive'), ('Why don''t eggs tell jokes? They''d crack each other up!', 'Chef', '2024-01-31 15:45:00', 1, 0.90, '😊 Positive'),
('I invented a new word: Plagiarism!', 'Writer', '2024-02-01 09:30:00', 0.78, '😊 Positive'), ('I invented a new word: Plagiarism!', 'Writer', '2024-02-01 09:30:00', 1, 0.78, '😊 Positive'),
('Why did the golfer bring two pairs of pants? In case he got a hole in one!', 'Golfer', '2024-02-02 12:15:00', 0.82, '😊 Positive'), ('Why did the golfer bring two pairs of pants? In case he got a hole in one!', 'Golfer', '2024-02-02 12:15:00', 1, 0.82, '😊 Positive'),
('What do you call a fake noodle? An impasta!', 'ItalianFood', '2024-02-03 14:40:00', 0.88, '😊 Positive'); ('What do you call a fake noodle? An impasta!', 'ItalianFood', '2024-02-03 14:40:00', 1, 0.88, '😊 Positive');

View File

@@ -8,7 +8,8 @@ cursor.execute('''CREATE TABLE IF NOT EXISTS jokes (
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,
joke TEXT NOT NULL, joke TEXT NOT NULL,
contributor TEXT NOT NULL, contributor TEXT NOT NULL,
published TEXT NOT NULL, created_date TEXT NOT NULL,
approved BOOLEAN DEFAULT 0,
sentiment_score REAL DEFAULT 0.0, sentiment_score REAL DEFAULT 0.0,
sentiment_label TEXT DEFAULT '😐 Neutral' sentiment_label TEXT DEFAULT '😐 Neutral'
)''') )''')
@@ -23,5 +24,5 @@ cursor.execute('''CREATE TABLE IF NOT EXISTS user_sentiments (
)''') )''')
conn.commit() conn.commit()
print("✅ Database and tables created successfully with AI sentiment columns and user sentiment tracking!") print("✅ Database and tables created successfully with approval system and user sentiment tracking!")
conn.close() conn.close()

Binary file not shown.

View File

@@ -2,21 +2,6 @@
import sqlite3 import sqlite3
import random import random
from datetime import datetime from datetime import datetime
from textblob import TextBlob # Simple NLP library
def analyze_joke_sentiment(joke_text):
"""Use AI to analyze the sentiment of a joke"""
analysis = TextBlob(joke_text)
polarity = analysis.sentiment.polarity
if polarity > 0.1:
label = "😊 Positive"
elif polarity < -0.1:
label = "😒 Negative"
else:
label = "😐 Neutral"
return polarity, label
def get_user_sentiment_for_joke(db, joke_id): def get_user_sentiment_for_joke(db, joke_id):
"""Get the average user sentiment for a specific joke""" """Get the average user sentiment for a specific joke"""
@@ -37,7 +22,7 @@ def get_user_sentiment_for_joke(db, joke_id):
''', (joke_id,)) ''', (joke_id,))
result = cursor.fetchone() result = cursor.fetchone()
avg_sentiment, total_votes = result avg_sentiment, total_votes = result if result else ('😐 Neutral', 0)
return avg_sentiment, total_votes return avg_sentiment, total_votes
def add_user_sentiment(db, joke_id, user_choice): def add_user_sentiment(db, joke_id, user_choice):
@@ -58,33 +43,29 @@ def main():
while True: while True:
print("\n" + "="*30) print("\n" + "="*30)
print("🤖 AI-ENHANCED JOKE BOT 🤖") print("🤖 JOKE BOT 🤖")
print("="*30) print("="*30)
print("1. Get random joke") print("1. Get random joke")
print("2. Add new joke") print("2. Add new joke")
print("3. Analyze joke sentiment") print("3. Quit")
print("4. Get joke by mood")
print("5. View all jokes with sentiment")
print("6. Quit")
choice = input("\nYour choice: ").strip() choice = input("\nYour choice: ").strip()
if choice == "1": if choice == "1":
# Get random joke with sentiment info # Get random approved joke
cursor = db.execute(''' cursor = db.execute('''
SELECT id, joke, contributor, published, sentiment_label SELECT id, joke, contributor
FROM jokes FROM jokes
WHERE approved = 1
ORDER BY RANDOM() ORDER BY RANDOM()
LIMIT 1 LIMIT 1
''') ''')
joke_data = cursor.fetchone() joke_data = cursor.fetchone()
if joke_data: if joke_data:
joke_id, joke, contributor, published, sentiment = joke_data joke_id, joke, contributor = joke_data
print(f"\n🤣 {joke}") print(f"\n🤣 {joke}")
print(f" 👤 Contributor: {contributor}") print(f" 👤 Contributor: {contributor}")
print(f" 📅 Published: {published}")
print(f" 🧠 AI Mood Analysis: {sentiment}")
# Get and display user sentiment stats # Get and display user sentiment stats
avg_sentiment, total_votes = get_user_sentiment_for_joke(db, joke_id) avg_sentiment, total_votes = get_user_sentiment_for_joke(db, joke_id)
@@ -94,20 +75,14 @@ def main():
# Ask user for their sentiment # Ask user for their sentiment
print(f"\n🎯 Rate this joke: 👍 (U)p, 👎 (D)own, or (N)eutral?") print(f"\n🎯 Rate this joke: 👍 (U)p, 👎 (D)own, or (N)eutral?")
user_input = input("Your choice (u/d/n): ").strip().lower() user_input = input("Your choice (u/d/n): ").strip().lower()
user_choice = 'up' if user_input in ['u', 'up'] else 'down' if user_input in ['d', 'down'] else 'neutral'
if user_input in ['u', 'up']:
user_choice = 'up'
elif user_input in ['d', 'down']:
user_choice = 'down'
else:
user_choice = 'neutral'
if add_user_sentiment(db, joke_id, user_choice): if add_user_sentiment(db, joke_id, user_choice):
print(f"✅ Your rating ({'👍 Up' if user_choice == 'up' else '👎 Down' if user_choice == 'down' else '😐 Neutral'}) recorded!") print(f"✅ Your rating ({'👍 Up' if user_choice == 'up' else '👎 Down' if user_choice == 'down' else '😐 Neutral'}) recorded!")
else: else:
print("❌ Could not save your rating.") print("❌ Could not save your rating.")
else: else:
print("📭 No jokes in the database yet!") print(" No approved jokes in the database yet!")
elif choice == "2": elif choice == "2":
new_joke = input("Enter your joke: ").strip() new_joke = input("Enter your joke: ").strip()
@@ -117,172 +92,32 @@ def main():
name = input("Your name (or press Enter for 'Anonymous'): ").strip() or "Anonymous" name = input("Your name (or press Enter for 'Anonymous'): ").strip() or "Anonymous"
# AI Analysis
score, label = analyze_joke_sentiment(new_joke)
print(f"\n🤖 AI Analysis Results:")
print(f" Sentiment Score: {score:.2f}")
print(f" Mood Label: {label}")
# Get current date/time # Get current date/time
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
try: try:
cursor = db.cursor() cursor = db.cursor()
cursor.execute(''' cursor.execute('''
INSERT INTO jokes (joke, contributor, published, sentiment_score, sentiment_label) INSERT INTO jokes (joke, contributor, created_date, approved)
VALUES (?, ?, ?, ?, ?) VALUES (?, ?, ?, 0)
''', (new_joke, name, current_time, score, label)) ''', (new_joke, name, current_time))
# Get the ID of the newly inserted joke # Get the ID of the newly inserted joke
new_joke_id = cursor.lastrowid new_joke_id = cursor.lastrowid
db.commit() db.commit()
print("Joke saved with AI analysis!") print("Submitted for approval!")
# Ask user for their sentiment on the new joke
print(f"\n🎯 Rate your own joke: 👍 (U)p, 👎 (D)own, or (N)eutral?")
user_input = input("Your choice (u/d/n): ").strip().lower()
if user_input in ['u', 'up']:
user_choice = 'up'
elif user_input in ['d', 'down']:
user_choice = 'down'
else:
user_choice = 'neutral'
if add_user_sentiment(db, new_joke_id, user_choice):
print(f"✅ Your rating ({'👍 Up' if user_choice == 'up' else '👎 Down' if user_choice == 'down' else '😐 Neutral'}) recorded!")
except Exception as e: except Exception as e:
print(f"❌ Error saving joke: {e}") print(f"❌ Error saving joke: {e}")
elif choice == "3": elif choice == "3":
joke_text = input("Enter a joke to analyze: ").strip() print("\n👋 Goodbye!")
if joke_text:
score, label = analyze_joke_sentiment(joke_text)
print(f"\n📊 AI Analysis Results:")
print(f" Joke: '{joke_text}'")
print(f" Sentiment Score: {score:.2f}")
print(f" Mood Label: {label}")
# Interpretation
print(f"\n📈 Interpretation:")
if score > 0.5:
print(" Very positive joke! 😄")
elif score > 0.1:
print(" Positive joke! 😊")
elif score < -0.5:
print(" Very negative/sarcastic joke! 😠")
elif score < -0.1:
print(" Negative joke! 😒")
else:
print(" Neutral joke! 😐")
else:
print("❌ Please enter a joke to analyze.")
elif choice == "4":
print("\n🎭 Choose mood:")
print("1. 😊 Positive jokes")
print("2. 😒 Negative jokes")
print("3. 😐 Neutral jokes")
print("4. 😄 Very positive jokes (score > 0.5)")
print("5. 😠 Very negative jokes (score < -0.5)")
mood_choice = input("Your choice: ").strip()
mood_queries = {
"1": ("😊 Positive", "sentiment_label = '😊 Positive'"),
"2": ("😒 Negative", "sentiment_label = '😒 Negative'"),
"3": ("😐 Neutral", "sentiment_label = '😐 Neutral'"),
"4": ("😄 Very Positive", "sentiment_score > 0.5"),
"5": ("😠 Very Negative", "sentiment_score < -0.5")
}
if mood_choice in mood_queries:
mood_name, query = mood_queries[mood_choice]
cursor = db.execute(f'''
SELECT id, joke, contributor, sentiment_score
FROM jokes
WHERE {query}
ORDER BY RANDOM()
LIMIT 1
''')
joke_data = cursor.fetchone()
if joke_data:
joke_id, joke, contributor, score = joke_data
print(f"\n{mood_name} joke:")
print(f"🤣 {joke}")
print(f" 👤 Contributor: {contributor}")
print(f" 📊 Sentiment Score: {score:.2f}")
# Get and display user sentiment stats
avg_sentiment, total_votes = get_user_sentiment_for_joke(db, joke_id)
if total_votes > 0:
print(f" 👥 Community Rating: {avg_sentiment} ({total_votes} votes)")
# Ask user for their sentiment
print(f"\n🎯 Rate this joke: 👍 (U)p, 👎 (D)own, or (N)eutral?")
user_input = input("Your choice (u/d/n): ").strip().lower()
if user_input in ['u', 'up']:
user_choice = 'up'
elif user_input in ['d', 'down']:
user_choice = 'down'
else:
user_choice = 'neutral'
if add_user_sentiment(db, joke_id, user_choice):
print(f"✅ Your rating ({'👍 Up' if user_choice == 'up' else '👎 Down' if user_choice == 'down' else '😐 Neutral'}) recorded!")
else:
print(f"📭 No {mood_name.lower()} jokes yet!")
else:
print("❌ Invalid choice!")
elif choice == "5":
print("\n📋 ALL JOKES IN DATABASE:")
print("-" * 70)
cursor = db.execute('''
SELECT j.id, j.joke, j.contributor, j.sentiment_label, j.sentiment_score
FROM jokes j
ORDER BY j.id DESC
''')
jokes = cursor.fetchall()
if jokes:
for i, (joke_id, joke, contributor, label, score) in enumerate(jokes, 1):
print(f"\n{i}. {joke}")
print(f" 👤 {contributor} | AI: {label} | Score: {score:.2f}")
# Get and display user sentiment stats
avg_sentiment, total_votes = get_user_sentiment_for_joke(db, joke_id)
if total_votes > 0:
print(f" 👥 Community Rating: {avg_sentiment} ({total_votes} votes)")
print(f"\n📊 Total jokes: {len(jokes)}")
else:
print("📭 No jokes in the database yet!")
elif choice == "6":
print("\n👋 Goodbye! Thanks for using the AI Joke Bot!")
break break
else: else:
print("❌ Invalid choice. Please select 1-6.") print("❌ Invalid choice. Please select 1-3.")
db.close() db.close()
if __name__ == "__main__": if __name__ == "__main__":
# Check if textblob is installed main()
try:
import textblob
main()
except ImportError:
print("❌ ERROR: textblob library is not installed!")
print("\n📦 Please install it using:")
print(" pip install textblob")
print(" python -m textblob.download_corpora")
print("\nThen run this script again.")

View File

@@ -84,13 +84,6 @@ def populate_database():
conn.commit() conn.commit()
print(f"✅ Added sample user sentiments for {len(jokes_with_sentiment)} joke entries") print(f"✅ Added sample user sentiments for {len(jokes_with_sentiment)} joke entries")
# Show sentiment distribution
cursor.execute('SELECT sentiment_label, COUNT(*) FROM jokes GROUP BY sentiment_label')
distribution = cursor.fetchall()
print(f'\n📈 AI Sentiment distribution:')
for label, cnt in distribution:
print(f' {label}: {cnt} jokes')
# Show user sentiment distribution if the table exists # Show user sentiment distribution if the table exists
try: try:
cursor.execute('SELECT user_sentiment, COUNT(*) FROM user_sentiments GROUP BY user_sentiment') cursor.execute('SELECT user_sentiment, COUNT(*) FROM user_sentiments GROUP BY user_sentiment')

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,374 @@
<!DOCTYPE html>
<!-- saved from url=(0098)file:///Users/home/Downloads/deepseek_html_joke_bot_speaking_cards_final.html_20260202_d830c8.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Speaking Cards - Joke Bot Project</title>
<style>
@page {
size: A4;
margin: 1cm;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: white;
}
.page {
width: 21cm;
min-height: 29.7cm;
margin: 0 auto;
padding: 0.5cm;
box-sizing: border-box;
}
.cards-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(4, 1fr);
gap: 0.8cm;
height: 28cm;
padding: 0.5cm;
}
.card {
background: white;
border: 2px solid #3498db;
border-radius: 8px;
padding: 0.6cm;
display: flex;
flex-direction: column;
justify-content: space-between;
page-break-inside: avoid;
}
.card-number {
background: #3498db;
color: white;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 14px;
margin-bottom: 0.3cm;
}
.card-content {
font-size: 12px;
line-height: 1.4;
flex-grow: 1;
}
.card-content strong {
display: block;
margin-bottom: 0.2cm;
color: #2c3e50;
}
.card-content ul {
margin: 0.2cm 0;
padding-left: 0.8cm;
}
.card-content li {
margin: 0.1cm 0;
font-size: 11px;
}
.card-time {
text-align: right;
font-size: 11px;
color: #666;
margin-top: 0.3cm;
padding-top: 0.2cm;
border-top: 1px dotted #ddd;
}
@media print {
body {
background: white;
}
.cards-grid {
height: auto;
min-height: 27cm;
}
.card {
break-inside: avoid;
page-break-inside: avoid;
}
}
</style>
</head>
<body>
<!-- Page 1: Cards 1-8 -->
<div class="page">
<div class="cards-grid">
<!-- Card 1 -->
<div class="card">
<div class="card-number">1</div>
<div class="card-content">
<strong>Slide 1: Title Slide</strong>
"Good morning! We are students from Technolyceum, and today we'll present our Joke Bot Development project."
<br><br>
"I'm [Your Name], and with me are my teammates: [List names]. We chose as a team to do a joke bot. Our supervisor is Bob Santos."
<br><br>
"Our journey took us from hardcoded jokes to a community-driven platform with AI integration."
</div>
<div class="card-time">45 sec</div>
</div>
<!-- Card 2 -->
<div class="card">
<div class="card-number">2</div>
<div class="card-content">
<strong>Slide 2: Development Journey</strong>
"Our project followed a development with three distinct stages."
<br><br>
"Stage 1 started with hardcoded jokes using Telegram API for testing."
<br><br>
"Stage 2 explored Yandex AI API for dynamic joke generation."
<br><br>
"Stage 3 added database functionality with user-generated content and interactive voting."
</div>
<div class="card-time">50 sec</div>
</div>
<!-- Card 3 -->
<div class="card">
<div class="card-number">3</div>
<div class="card-content">
<strong>Slide 3: Phase 1 - Hardcoded Jokes</strong>
"Let's look at Phase 1. This was our simplest implementation using the Telegram Bot API."
<br><br>
"We created a basic bot with two commands: /start for greeting users, and /joke to deliver a random joke from a pre-approved list."
<br><br>
"The jokes were hardcoded into the Python script and had limited user interaction."
<br><br>
"This stage helped introduce us to Python coding, basic bot functionality and API integration."
</div>
<div class="card-time">55 sec</div>
</div>
<!-- Card 4 -->
<div class="card">
<div class="card-number">4</div>
<div class="card-content">
<strong>Slide 4: Phase 2 - AI Integration</strong>
"For Phase 2, we briefly explored Yandex's AI API to generate jokes dynamically."
<br><br>
"Instead of static jokes, the bot used Yandex GPT to create original, context-aware humor."
<br><br>
"However the jokes were not so humorous. But it gave us some exposure to AI API services."
</div>
<div class="card-time">50 sec</div>
</div>
<!-- Card 5 -->
<div class="card">
<div class="card-number">5</div>
<div class="card-content">
<strong>Slide 5: Phase 3 - User-Generated Content</strong>
"Phase 3 introduced us to databases, user sentiment capture and transformed our project into a community driven platform."
<br><br>
"We added an SQLite database to store jokes, user information, and a feature to allow users to rate jokes."
<br><br>
"Users could now submit their own jokes which required administrative approval before publication."
<br><br>
"We implemented a voting system where users rate jokes with thumbs up, down, or neutral."
<br><br>
"This user sentiment analysis is a feature often used in AI systems."
</div>
<div class="card-time">55 sec</div>
</div>
<!-- Card 6 -->
<div class="card">
<div class="card-number">6</div>
<div class="card-content">
<strong>Slide 6: System Demonstration</strong>
"Let me demonstrate our final system's functionality."
<br><br>
"The command-line interface allows users to: get random jokes, add new jokes, and quit the program."
<br><br>
"Users can rate jokes immediately after viewing them, which can later be used for user sentiment analysis."
<br><br>
"This demonstrates a system with database, voting, and content management."
</div>
<div class="card-time">60 sec</div>
</div>
<!-- Card 7 -->
<div class="card">
<div class="card-number">7</div>
<div class="card-content">
<strong>Slide 7: Technology Stack</strong>
"Our project utilized several key technologies."
<br><br>
"Python 3.9+ formed our programming foundation."
<br><br>
"The Telegram Bot API handled all user interactions."
<br><br>
"SQLite managed our database needs for Phase 3."
<br><br>
"Yandex AI API provided AI capabilities in Phase 2."
</div>
<div class="card-time">55 sec</div>
</div>
<!-- Card 8 -->
<div class="card">
<div class="card-number">8</div>
<div class="card-content">
<strong>Slide 8: Learning Outcomes</strong>
"Through this project, we gained valuable technical skills."
<br><br>
"We learned API integration with both Telegram."
<br><br>
"Database design and management with SQLite."
<br><br>
"We practiced iterative development, starting simple and adding complexity."
<br><br>
"The three-phase approach taught us progressive system enhancement."
</div>
<div class="card-time">45 sec</div>
</div>
</div>
</div>
<!-- Page 2: Cards 9-END + Helper Cards -->
<div class="page">
<div class="cards-grid">
<!-- Card 9 -->
<div class="card">
<div class="card-number">9</div>
<div class="card-content">
<strong>Slide 9: Future Applications</strong>
"Besides being able to integrate our joke bot with the schools existing Technolyceum_bot, our system's architecture has potential beyond joke sharing."
<br><br>
"It could adapt for capturing feedback from students, parents and school staff and to do sentiment analysis."
<br><br>
"The database structure could be scaled to work with surveys and polling systems."
<br><br>
"The design allows adaptation for various institutional needs."
</div>
<div class="card-time">50 sec</div>
</div>
<!-- Card 10 -->
<div class="card">
<div class="card-number">10</div>
<div class="card-content">
<strong>Slide 10: Conclusion</strong>
"In conclusion, our Telegram Joke Bot demonstrates practical application of programming concepts."
<br><br>
"We implemented a three-phase development from simple to complex."
<br><br>
"We practiced iterative improvement and feature addition."
<br><br>
"The project provided hands-on learning in API usage and database management."
<br><br>
"Thank you for your attention. We're happy to answer any questions about our development process."
</div>
<div class="card-time">50 sec</div>
</div>
<!-- Demo Card -->
<div class="card" style="border: 2px solid #2ecc71;">
<div class="card-number" style="background: #2ecc71;">🤖</div>
<div class="card-content">
<strong>DEMO SCRIPT - Slide 6</strong>
"Now, let me show you our system in action."
<br><br>
"Here's our command-line interface. I'll select option 1 to get a random joke."
<br><br>
[Show joke display]
<br><br>
"You can see the joke, the contributor, and the community rating."
<br><br>
"Now I'll rate this joke with 'u' for thumbs up."
<br><br>
"The system confirms my rating has been recorded in the database."
</div>
<div class="card-time">DEMO</div>
</div>
<!-- Technical Terms Card -->
<div class="card" style="border: 2px dashed #ddd; background: #f8f9fa;">
<div class="card-number" style="background: #ddd; color: #666;">!</div>
<div class="card-content" style="color: #999; text-align: center;">
<strong>Technical Terms:</strong>
<br><br>
• API = Application Programming Interface
<br>
• SQLite = Lightweight database
<br>
• GPT = Generative Pre-trained Transformer
<br>
• CLI = Command Line Interface
</div>
<div class="card-time">-</div>
</div>
<!-- Q&A Card -->
<div class="card" style="border: 2px dashed #ddd; background: #f8f9fa;">
<div class="card-number" style="background: #ddd; color: #666;">Q</div>
<div class="card-content" style="color: #999; text-align: center;">
<strong>Possible Questions:</strong>
<br><br>
• Why did you choose a joke bot?
<br>
• What was the hardest part?
<br>
• How do you moderate jokes?
<br>
• Can this work with school systems?
</div>
<div class="card-time">-</div>
</div>
<!-- Timing Card -->
<div class="card" style="border: 2px dashed #ddd; background: #f8f9fa;">
<div class="card-number" style="background: #ddd; color: #666;">⏱️</div>
<div class="card-content" style="color: #999; text-align: center;">
<strong>Timing:</strong>
<br><br>
• Total: 8 minutes
<br>
• Demo: 1 minute
<br>
• Q&amp;A: 2 minutes
<br>
• Keep to time!
</div>
<div class="card-time">-</div>
</div>
<!-- Presenter Tips Card -->
<div class="card" style="border: 2px dashed #ddd; background: #f8f9fa;">
<div class="card-number" style="background: #ddd; color: #666;">🎤</div>
<div class="card-content" style="color: #999; text-align: center;">
<strong>Presenter Tips:</strong>
<br><br>
• Speak clearly and slowly
<br>
• Look at the audience
<br>
• Point to relevant code/screens
<br>
• Smile and be confident!
</div>
<div class="card-time">-</div>
</div>
</div>
</div>
</body></html>