Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π¨
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.45.0
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned:
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# π
|
| 14 |
|
| 15 |
-
A conversational
|
| 16 |
|
| 17 |
## π What's Included
|
| 18 |
|
|
@@ -25,10 +25,11 @@ A conversational AI chatbot powered by Microsoft's Phi-3-mini model with a fun,
|
|
| 25 |
## π¦ Download & Quick Start
|
| 26 |
|
| 27 |
### Option 1: Clone Everything
|
|
|
|
| 28 |
```bash
|
| 29 |
# Clone the complete repository
|
| 30 |
-
git clone https://huggingface.co/spaces/lingadevaruhp/
|
| 31 |
-
cd
|
| 32 |
|
| 33 |
# Install dependencies (one command, no conflicts)
|
| 34 |
pip install transformers torch gradio accelerate
|
|
@@ -38,13 +39,15 @@ python app.py
|
|
| 38 |
```
|
| 39 |
|
| 40 |
### Option 2: Download Just the Dataset
|
|
|
|
| 41 |
Get the dataset file directly for your own projects:
|
| 42 |
-
|
|
|
|
| 43 |
- **Direct download**: Right-click β "Save as" or use `wget`
|
| 44 |
|
| 45 |
```bash
|
| 46 |
# Download dataset only
|
| 47 |
-
wget https://huggingface.co/spaces/lingadevaruhp/
|
| 48 |
```
|
| 49 |
|
| 50 |
## π₯ Using the Dataset (Offline Training)
|
|
@@ -56,6 +59,7 @@ The `flirt_dataset.jsonl` file contains 20 flirty tech Q&A pairs in standard for
|
|
| 56 |
```
|
| 57 |
|
| 58 |
### Load in Python (Copy-Paste Ready)
|
|
|
|
| 59 |
```python
|
| 60 |
import json
|
| 61 |
|
|
@@ -70,6 +74,7 @@ for item in dataset[:2]: # Show first 2
|
|
| 70 |
```
|
| 71 |
|
| 72 |
### Use with Popular Training Libraries
|
|
|
|
| 73 |
```python
|
| 74 |
# With Hugging Face datasets
|
| 75 |
from datasets import load_dataset
|
|
@@ -92,7 +97,7 @@ with open('flirt_dataset.jsonl', 'r') as f:
|
|
| 92 |
|
| 93 |
## π» Model Information
|
| 94 |
|
| 95 |
-
- **Base Model**: `
|
| 96 |
- **No fine-tuning required** - Works out of the box
|
| 97 |
- **Public model** - No API keys or special access needed
|
| 98 |
- **Lightweight** - Runs on consumer GPUs (4GB+ VRAM recommended)
|
|
@@ -101,6 +106,7 @@ with open('flirt_dataset.jsonl', 'r') as f:
|
|
| 101 |
## π Advanced Usage
|
| 102 |
|
| 103 |
### Custom Training with Your Data
|
|
|
|
| 104 |
```python
|
| 105 |
# Combine with your own data
|
| 106 |
my_data = []
|
|
@@ -120,12 +126,13 @@ with open('my_custom_dataset.jsonl', 'w') as f:
|
|
| 120 |
```
|
| 121 |
|
| 122 |
### Fine-tune Locally (Optional)
|
|
|
|
| 123 |
```python
|
| 124 |
# Example fine-tuning setup (requires additional setup)
|
| 125 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 126 |
from transformers import TrainingArguments, Trainer
|
| 127 |
|
| 128 |
-
model_name = "
|
| 129 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 130 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 131 |
|
|
@@ -137,22 +144,26 @@ model = AutoModelForCausalLM.from_pretrained(model_name)
|
|
| 137 |
### Common Issues & Solutions
|
| 138 |
|
| 139 |
**"Model not found"** β Check internet connection for first download
|
|
|
|
| 140 |
```bash
|
| 141 |
pip install --upgrade transformers torch
|
| 142 |
```
|
| 143 |
|
| 144 |
**"Out of memory"** β Reduce batch size or use CPU mode
|
|
|
|
| 145 |
```python
|
| 146 |
# In app.py, add:
|
| 147 |
device = "cpu" # Force CPU usage
|
| 148 |
```
|
| 149 |
|
| 150 |
**"Gradio won't start"** β Update Gradio
|
|
|
|
| 151 |
```bash
|
| 152 |
pip install --upgrade gradio
|
| 153 |
```
|
| 154 |
|
| 155 |
**"Dataset won't load"** β Verify file format
|
|
|
|
| 156 |
```bash
|
| 157 |
# Check if file is valid JSON lines
|
| 158 |
python -c "import json; [json.loads(line) for line in open('flirt_dataset.jsonl')]; print('Valid!')"
|
|
@@ -182,5 +193,4 @@ python -c "import json; [json.loads(line) for line in open('flirt_dataset.jsonl'
|
|
| 182 |
- **Added**: Copy-paste ready code examples
|
| 183 |
|
| 184 |
---
|
| 185 |
-
|
| 186 |
**Ready to get flirty with AI? Download, run, and start chatting! π**
|
|
|
|
| 1 |
---
|
| 2 |
+
title: thoshan_Flash
|
| 3 |
emoji: π¨
|
| 4 |
colorFrom: yellow
|
| 5 |
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.45.0
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# π thoshan_Flash - Complete Offline Package
|
| 14 |
|
| 15 |
+
A conversational Large language model with a fun, flirty personality. This repository includes everything you need for offline development and training - no cloud dependencies required!
|
| 16 |
|
| 17 |
## π What's Included
|
| 18 |
|
|
|
|
| 25 |
## π¦ Download & Quick Start
|
| 26 |
|
| 27 |
### Option 1: Clone Everything
|
| 28 |
+
|
| 29 |
```bash
|
| 30 |
# Clone the complete repository
|
| 31 |
+
git clone https://huggingface.co/spaces/lingadevaruhp/thoshan_Flash_mini
|
| 32 |
+
cd thoshan_Flash_mini
|
| 33 |
|
| 34 |
# Install dependencies (one command, no conflicts)
|
| 35 |
pip install transformers torch gradio accelerate
|
|
|
|
| 39 |
```
|
| 40 |
|
| 41 |
### Option 2: Download Just the Dataset
|
| 42 |
+
|
| 43 |
Get the dataset file directly for your own projects:
|
| 44 |
+
|
| 45 |
+
- **Raw JSONL**: [flirt_dataset.jsonl](https://huggingface.co/spaces/lingadevaruhp/thoshan_Flash_mini/raw/main/flirt_dataset.jsonl)
|
| 46 |
- **Direct download**: Right-click β "Save as" or use `wget`
|
| 47 |
|
| 48 |
```bash
|
| 49 |
# Download dataset only
|
| 50 |
+
wget https://huggingface.co/spaces/lingadevaruhp/thoshan_Flash_mini/raw/main/flirt_dataset.jsonl
|
| 51 |
```
|
| 52 |
|
| 53 |
## π₯ Using the Dataset (Offline Training)
|
|
|
|
| 59 |
```
|
| 60 |
|
| 61 |
### Load in Python (Copy-Paste Ready)
|
| 62 |
+
|
| 63 |
```python
|
| 64 |
import json
|
| 65 |
|
|
|
|
| 74 |
```
|
| 75 |
|
| 76 |
### Use with Popular Training Libraries
|
| 77 |
+
|
| 78 |
```python
|
| 79 |
# With Hugging Face datasets
|
| 80 |
from datasets import load_dataset
|
|
|
|
| 97 |
|
| 98 |
## π» Model Information
|
| 99 |
|
| 100 |
+
- **Base Model**: `thoshan_Flash`
|
| 101 |
- **No fine-tuning required** - Works out of the box
|
| 102 |
- **Public model** - No API keys or special access needed
|
| 103 |
- **Lightweight** - Runs on consumer GPUs (4GB+ VRAM recommended)
|
|
|
|
| 106 |
## π Advanced Usage
|
| 107 |
|
| 108 |
### Custom Training with Your Data
|
| 109 |
+
|
| 110 |
```python
|
| 111 |
# Combine with your own data
|
| 112 |
my_data = []
|
|
|
|
| 126 |
```
|
| 127 |
|
| 128 |
### Fine-tune Locally (Optional)
|
| 129 |
+
|
| 130 |
```python
|
| 131 |
# Example fine-tuning setup (requires additional setup)
|
| 132 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 133 |
from transformers import TrainingArguments, Trainer
|
| 134 |
|
| 135 |
+
model_name = "thoshan_Flash"
|
| 136 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 137 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 138 |
|
|
|
|
| 144 |
### Common Issues & Solutions
|
| 145 |
|
| 146 |
**"Model not found"** β Check internet connection for first download
|
| 147 |
+
|
| 148 |
```bash
|
| 149 |
pip install --upgrade transformers torch
|
| 150 |
```
|
| 151 |
|
| 152 |
**"Out of memory"** β Reduce batch size or use CPU mode
|
| 153 |
+
|
| 154 |
```python
|
| 155 |
# In app.py, add:
|
| 156 |
device = "cpu" # Force CPU usage
|
| 157 |
```
|
| 158 |
|
| 159 |
**"Gradio won't start"** β Update Gradio
|
| 160 |
+
|
| 161 |
```bash
|
| 162 |
pip install --upgrade gradio
|
| 163 |
```
|
| 164 |
|
| 165 |
**"Dataset won't load"** β Verify file format
|
| 166 |
+
|
| 167 |
```bash
|
| 168 |
# Check if file is valid JSON lines
|
| 169 |
python -c "import json; [json.loads(line) for line in open('flirt_dataset.jsonl')]; print('Valid!')"
|
|
|
|
| 193 |
- **Added**: Copy-paste ready code examples
|
| 194 |
|
| 195 |
---
|
|
|
|
| 196 |
**Ready to get flirty with AI? Download, run, and start chatting! π**
|