File size: 2,854 Bytes
190b55b
 
 
 
 
 
 
 
 
 
 
 
374ad82
 
 
 
 
190b55b
374ad82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24c2dc2
 
 
 
fe43ea8
b741b52
52f288e
3e405d0
24c2dc2
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: CPU Paraphraser Demo
emoji: ๐Ÿข
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: 'CPU-only Paraphraser '
---
# ๐Ÿ”„ Text Paraphraser  
[![Hugging Face Space](https://img.shields.io/badge/HuggingFace-Spaces-blue?logo=huggingface)](https://huggingface.co/spaces/your-username/text-paraphraser)  
[![Gradio UI](https://img.shields.io/badge/Gradio-5.31.0-green?logo=gradio)]  
[![Model](https://img.shields.io/badge/Model-Vamsi%2FT5_Paraphrase_Paws-orange)](https://huggingface.co/Vamsi/T5_Paraphrase_Paws)  
[![License-MIT](https://img.shields.io/badge/License-MIT-lightgrey)](LICENSE)

---

## ๐Ÿš€ Overview  
Unlock **creative rewriting** with zero-shot **T5 paraphrasing**.  
Type any sentence and instantly generate multiple stylistic variationsโ€”**100% CPU**, no fine-tuning required.

> **AI buzzwords:**  
> โ€ข Sequence-to-Sequence โ€ข Zero-Shot Paraphrasing โ€ข Top-K Sampling โ€ข Temperature Control โ€ข Transformer-based NLP โ€ข Edge Inference โ€ข Cloud-Native Demo

---

## โœจ Key Features

| ๐Ÿ”‘ Feature                   | ๐Ÿ” Description                                                  |
|------------------------------|----------------------------------------------------------------|
| **๐Ÿ’ฌ Diverse Rewrites**         | Generate up to 5 alternative phrasings for any input sentence   |
| **โš™๏ธ Sampling Controls**        | Uses `top_k=120`, `top_p=0.95` to balance diversity vs. quality |
| **๐Ÿ’ป CPU-Only Inference**      | Runs on free-tier Spaces (2 vCPU / 16โ€†GB RAM)                  |
| **๐ŸŽจ Interactive UI**          | Gradio Blocks with input, slider, button, and result table     |
| **๐Ÿ”ง Zero-Config Deploy**       | Commit three filesโ€”Spaces auto-builds & hosts your demo        |

---

## ๐Ÿ—๏ธ How It Works

1. **User Input** โ€“ Provide a sentence to paraphrase.  
2. **T5-Paraphrase Pipeline** โ€“ Prepends โ€œparaphrase:โ€ and generates variants via sampling.  
3. **Result Formatting** โ€“ Displays each variant side-by-side in a table.  
4. **UI Rendering** โ€“ Gradio streams the outputs for instant review.

---

## ๐Ÿ› ๏ธ Local Development

```bash
git clone https://github.com/your-username/text-paraphraser.git
cd text-paraphraser
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python app.py

## Latest Update

- Updated Gradio UI to version 5.31.0 for improved performance. - May 29, 2025 ๐Ÿ“
- Improved result table formatting in the UI. ๐Ÿš€ - June 02, 2025 ๐Ÿ“
- Optimized CPU inference for faster response times. - June 01, 2025 ๐Ÿ“
- Added support for longer input sentences. - May 31, 2025 ๐Ÿ“
- Enhanced paraphrasing pipeline with new sampling parameters. - May 30, 2025 ๐Ÿ“

**Website**: https://ghostainews.com/
**Discord**: https://discord.gg/BfA23aYz