Social Media Chat Bot Marvin

Undergraduate dissertation: An AI-powered Telegram chatbot providing real-time social media marketing insights and analytics.

AI/MLDissertation
# features

Key Features

Core technologies and system features.

Interactive Chatbot

Telegram-based bot for querying social media marketing insights.

Data Analytics

Integration with Pandas for processing and analyzing large marketing datasets.

AI/ML Integration

Leverages AI to interpret trends and offer automated marketing recommendations.

# source

Project Source Code

Explore the primary logical modules.

EXPLORER
telegram_bot.py
srctelegram_bot.py
1import pandas as pd
2from telegram import Update
3from telegram.ext import Application, CommandHandler, ContextTypes
4
5# Load social media dataset
6df = pd.read_csv('marketing_data.csv')
7
8async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
9 """Send a message when the command /start is issued."""
10 await update.message.reply_text('Hello! I am Marvin, your Social Media Chat Bot.')
11
12async def get_insights(update: Update, context: ContextTypes.DEFAULT_TYPE):
13 """Analyze and return marketing insights."""
14 top_campaign = df.loc[df['engagement_rate'].idxmax()]
15 response = f"Top Campaign: {top_campaign['name']}\nEngagement Rate: {top_campaign['engagement_rate']}%"
16 await update.message.reply_text(response)
17
18def main():
19 application = Application.builder().token("YOUR_TOKEN").build()
20 application.add_handler(CommandHandler("start", start))
21 application.add_handler(CommandHandler("insights", get_insights))
22 application.run_polling()
23
24if __name__ == '__main__':
25 main()
# simulation

Live Simulation Output

Simulated console execution.

simulation
$_
# repositories

Source Code

GitHub repositories for this project.