File size: 1,733 Bytes
e369950
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Fake Profile Detection 
# ๐Ÿšจ Fake Instagram Profile Detection using Machine Learning

This project is a real-time Instagram profile analyzer that predicts whether a given profile is **fake** or **real** using machine learning. It uses profile metrics like follower count, following count, post count, and verification status to make predictions.

---

## ๐Ÿ“Œ How It Works

- You enter an Instagram **username**.
- The application uses the **Apify API** to fetch public profile data.
- It extracts key features such as:
  - Number of followers
  - Number of followings
  - Number of posts
  - Is the account private?
  - Is the account verified?
- These features are passed into a pre-trained **machine learning model** (`classifier.pkl`) to predict whether the profile is real or fake.

---

## ๐Ÿ›  Technologies Used

- **Python**
- **Streamlit** โ€“ for building the web app
- **Joblib** โ€“ for loading the ML model
- **Apify API** โ€“ to scrape Instagram data
- **Scikit-learn** โ€“ for training the ML model
- **Pandas, NumPy** โ€“ for data manipulation

---

## ๐Ÿง  ML Model

The model is trained using a labeled dataset containing Instagram profile attributes. The classification is binary:
- `0` โ†’ Likely Fake
- `1` โ†’ Likely Real

The training includes feature normalization and multiple algorithm trials like Logistic Regression, Decision Trees, and Random Forests. The final deployed model is chosen based on accuracy and generalization.

---

## ๐Ÿ–ฅ๏ธ Project UI

- The app is built with **Streamlit** for a clean and interactive interface.
- Users simply input a **username** and click **Predict**.
- Output shows the profileโ€™s stats and the prediction result with appropriate messaging (Success/Error).

---