Skip to content

jagritiu/Reddit-User-Persona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Reddit User Persona Generator

This project is part of the BeyondChats AI/LLM Intern Assignment. It takes a Reddit user profile URL and generates a detailed user persona based on the user's posts and comments.


🔧 How to Use

1️⃣ Clone the Repository

git clone https://github.com/jagritiu

cd reddit-user-persona

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Add Reddit API Credentials

Open main.py and replace the placeholders with your credentials:

client_id = 'ExfbNnNktQpBI6oP3lZontg' client_secret = '7MU9mA3VosKbJp9mcSG6rr7dSG-Oeg' user_agent = 'script:reddit-persona:v1.0 (by u/FriendshipOk6460)' To get your own credentials, go to: https://www.reddit.com/prefs/apps and create a script-type application.

▶️ Run the Script

python main.py You'll be prompted to enter a Reddit profile URL like: https://www.reddit.com/user/kojied/ Once done, two output files will be created inside the /output/ folder:

kojied_raw.txt → All scraped comments/posts

kojied.txt → Final analyzed user persona

📁 Output Details The output persona includes:

🎯 Personality traits

🧠 Interests & habits

💬 Writing style or tone

💼 Profession (if possible)

📌 Source citations from posts/comments

✅ Example

Input:

https://www.reddit.com/user/kojied/

Output:

output/kojied.txt 📦 Folder Structure

reddit-user-persona/ ├── main.py ├── output/ │ ├── kojied_raw.txt │ └── kojied.txt ├── README.md └── requirements.txt

🛠 Tech Used Python 3.11

praw for Reddit API

Standard Python libraries (os, re, datetime, etc.)

🧠 Goal

This project demonstrates:

Reddit scraping via PRAW

Trait and tone analysis

Practical use of LLM-style logic to generate insights

Hands-on data parsing and persona generation

❤️ Made with love

For the BeyondChats AI/LLM Internship Assignment

by Jagriti Upadhyay

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors