https://github.com/harishri2002/verbose-ai
Verbose AI is a Dart-based utility that uses AI to automatically standardize, correct grammar and spelling, and rewrite casual or broken English into professionally polished text using Google's gemma-2-2b-it model via Hugging Face Inference API.
https://github.com/harishri2002/verbose-ai
ai android desktop ios text-gen web
Last synced: 12 months ago
JSON representation
Verbose AI is a Dart-based utility that uses AI to automatically standardize, correct grammar and spelling, and rewrite casual or broken English into professionally polished text using Google's gemma-2-2b-it model via Hugging Face Inference API.
- Host: GitHub
- URL: https://github.com/harishri2002/verbose-ai
- Owner: Harishri2002
- Created: 2025-04-19T14:06:45.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-27T10:18:37.000Z (about 1 year ago)
- Last Synced: 2025-04-27T11:29:10.179Z (about 1 year ago)
- Topics: ai, android, desktop, ios, text-gen, web
- Language: Dart
- Homepage: https://verbose-ai.vercel.app
- Size: 298 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🗣️ Verbose AI – Professional Text Standardization
**Verbose AI** is a Dart-based utility that uses AI to automatically standardize, correct grammar and spelling, and rewrite casual or broken English into professionally polished text using Google's `gemma-2-2b-it` model via Hugging Face Inference API.
---
## ✨ Features
- ✅ Fixes grammar, spelling, and sentence structure
- ✅ Rewrites text in a formal, professional tone
- ✅ Uses state-of-the-art open-source LLM (Gemma 2B IT)
- ✅ Fallback mechanism if the API fails
- ✅ Easy to plug into any Dart / Flutter project
---
## 🚀 How It Works
The app sends user input to the Hugging Face **Chat Completions API**, using Google's instruction-tuned Gemma model. The model rewrites the text professionally and returns the standardized output.
---
## 🧠 Powered By
- 🧩 **Model**: [`google/gemma-2-2b-it`](https://huggingface.co/google/gemma-2-2b-it)
- 🔗 **API**: Hugging Face Inference Chat Completions Endpoint
- 🧰 **Language**: Dart
---
## 📦 Installation
Add the following dependencies to your `pubspec.yaml`:
```yaml
dependencies:
http: ^0.13.6
```
---
## 🛠️ Setup
1. Create an account at [Hugging Face](https://huggingface.co/join).
2. Generate a free API token at [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens).
3. Replace the placeholder API key in `TextService` with your own:
```dart
final String apiKey = "hf_YourTokenHere";
```
---
## 💡 Example Usage
```dart
final service = TextService();
void main() async {
String input = "how are u dongd aht bro";
String result = await service.standardizeText(input);
print(result); // Output: "How are you doing that, brother?" (Professionally rephrased)
}
```
---
## 🧰 API Details
**Endpoint:**
```
POST https://api-inference.huggingface.co/chat/completions
```
**Payload:**
```json
{
"model": "google/gemma-2-2b-it",
"messages": [
{"role": "system", "content": "You are a professional editor..."},
{"role": "user", "content": "raw input text"}
],
"temperature": 0.3,
"max_tokens": 150
}
```
---
## 🛡️ Fallback Behavior
If the Hugging Face API fails (e.g. network error or quota exceeded), the app gracefully falls back to a basic standardization method using simple string replacements.
---
## 📝 License
MIT License. Feel free to modify, use, and distribute.
---
## 👨💻 Author
Made with ❤️ by [Harishri](https://github.com/Harishri2002)
---
```
Let me know if you want to include screenshots, a badge (e.g. Dart Pub), or convert this into a Flutter UI version too!