Spaces:
Sleeping
Sleeping
hç
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,50 +1,63 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
title: Encrypted Text Classifier
|
| 4 |
+
emoji: 🔐
|
| 5 |
+
colorFrom: gray
|
| 6 |
+
colorTo: blue
|
| 7 |
+
sdk: streamlit
|
| 8 |
+
sdk_version: "1.32.2"
|
| 9 |
+
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# 🔐 Encrypted Text Classifier – 20 Newsgroups Cipher Challenge
|
| 15 |
+
|
| 16 |
+
This project is built for the [Kaggle Ciphertext Challenge](https://www.kaggle.com/competitions/20-newsgroups-ciphertext-challenge), where the goal is to classify encrypted text documents into 20 different newsgroup categories.
|
| 17 |
+
|
| 18 |
+
🎯 Even without decrypting the text, we trained a character-level machine learning model that achieves over **63% accuracy**.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## 📂 Project Structure
|
| 23 |
+
cipher-classifier/
|
| 24 |
+
├── app.py # Streamlit app
|
| 25 |
+
├── cipher_classifier.pkl # Pickled model + vectorizer
|
| 26 |
+
├── train.csv # Kaggle training data
|
| 27 |
+
├── requirements.txt # Libraries for deployment
|
| 28 |
+
└── README.md
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## 🧠 Model Overview
|
| 34 |
+
|
| 35 |
+
- **Input:** Ciphertext strings (unreadable encrypted text)
|
| 36 |
+
- **Vectorization:** `CountVectorizer` with char-level n-grams (1 to 3)
|
| 37 |
+
- **Model:** Logistic Regression (sklearn)
|
| 38 |
+
- **Accuracy:** ~63% (without decryption)
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
Example Output
|
| 44 |
+
Input (Ciphertext) Predicted Label
|
| 45 |
+
['W')(7x1zay7Hb3... 15
|
| 46 |
+
Tx4a8M\HNsyp;HM... 8
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
📦 Deployment
|
| 51 |
+
This app is designed to run on:
|
| 52 |
+
|
| 53 |
+
🟢 Hugging Face Spaces
|
| 54 |
+
|
| 55 |
+
🟢 Streamlit Cloud
|
| 56 |
+
|
| 57 |
+
🔵 GitHub
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
📌 Kaggle Link
|
| 61 |
+
You can download the dataset from the official competition:
|
| 62 |
+
👉 Kaggle – 20 Newsgroups Ciphertext Challenge
|
| 63 |
+
|