ghostai1 commited on
Commit
b5c0331
·
verified ·
1 Parent(s): 311f28b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -1
README.md CHANGED
@@ -10,5 +10,50 @@ pinned: false
10
  license: apache-2.0
11
  short_description: Masked Word Predicto CPU
12
  ---
 
 
 
 
 
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: apache-2.0
11
  short_description: Masked Word Predicto CPU
12
  ---
13
+ # 🔍 Masked Word Predictor
14
+ [![Hugging Face Space](https://img.shields.io/badge/HuggingFace-Spaces-blue?logo=huggingface)](https://huggingface.co/spaces/your-username/masked-word-predictor)
15
+ [![Gradio UI](https://img.shields.io/badge/Gradio-5.31.0-green?logo=gradio)]
16
+ [![Model](https://img.shields.io/badge/Model-distilroberta--base-orange)](https://huggingface.co/distilroberta-base)
17
+ [![License](https://img.shields.io/badge/License-MIT-lightgrey)](LICENSE)
18
 
19
+ ---
20
+
21
+ ## 🚀 Overview
22
+ Tap into **Masked Language Modeling** with **DistilRoBERTa**—no training required.
23
+ Type a sentence containing the special `[MASK]` token and get the model’s **top-K** completions instantly, all on **free CPU**.
24
+
25
+ > **Key AI concepts:**
26
+ > • Masked Language Modeling (MLM) • Transformer-based NLP • Distilled Architectures • Real-time Inference • Edge Deployment • Cloud-native Demo
27
+
28
+ ---
29
+
30
+ ## ✨ Features
31
+
32
+ | 🔑 Feature | 🔍 Why It’s Cool |
33
+ |----------------------------|----------------------------------------------|
34
+ | **🧠 Transformer MLM** | Uses DistilRoBERTa for lightning-fast fills |
35
+ | **⚡ CPU-Only Inference** | Runs on free-tier Space (2 vCPU / 16 GB RAM) |
36
+ | **🔢 Top-K Control** | Slider to choose how many predictions to show |
37
+ | **🎨 Interactive UI** | Gradio Blocks: input, button, and DataFrame |
38
+ | **🔧 Zero-Config Deploy** | Commit three files—Spaces auto-builds |
39
+ | **💡 Educational Demos** | Great for teaching how MLM works |
40
+
41
+ ---
42
+
43
+ ## 🏗️ How It Works
44
+
45
+ 1. **User Input** – Sentence with one or more `[MASK]` tokens.
46
+ 2. **MLM Pipeline** – `pipeline("fill-mask")` computes token-level likelihoods.
47
+ 3. **Ranking** – Returns the top-K predicted tokens with scores.
48
+ 4. **UI Rendering** – Gradio shows each filled sentence and its confidence.
49
+
50
+ ---
51
+
52
+ ## 🛠️ Local Development
53
+
54
+ ```bash
55
+ git clone https://github.com/your-username/masked-word-predictor.git
56
+ cd masked-word-predictor
57
+ python3 -m venv venv && source venv/bin/activate
58
+ pip install -r requirements.txt
59
+ python app.py