Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 📌 FLAN-T5 Fine-tuned for Suggestion Generation
|
| 2 |
+
|
| 3 |
+
This model is a fine-tuned version of [google/flan-t5-base](https://huggingface.co/google/flan-t5-base) on a custom dataset of YouTube comments and suggestions.
|
| 4 |
+
It generates viewer suggestions or feedback improvements based on an input comment.
|
| 5 |
+
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
## ✨ Model Details
|
| 9 |
+
- Base model: google/flan-t5-base
|
| 10 |
+
- Task: text2text-generation (Seq2Seq)
|
| 11 |
+
- Dataset: Custom dataset (dataset.json with input and output fields)
|
| 12 |
+
- Training: 10 epochs, batch size 4, beam search decoding
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
## 🚀 Usage
|
| 17 |
+
|
| 18 |
+
You can use this model directly with the 🤗 Transformers pipeline:
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import pipeline
|
| 22 |
+
|
| 23 |
+
# Load the fine-tuned model from Hugging Face
|
| 24 |
+
model_id = "username/flan_t5_youtube_full"
|
| 25 |
+
|
| 26 |
+
generator = pipeline("text2text-generation", model=model_id)
|
| 27 |
+
|
| 28 |
+
comment = "Audio was clear and easy to understand."
|
| 29 |
+
input_text = "generate suggestion: " + comment
|
| 30 |
+
|
| 31 |
+
result = generator(input_text, max_length=128, num_beams=4, early_stopping=True)
|
| 32 |
+
|
| 33 |
+
print("Input Comment:", comment)
|
| 34 |
+
print("Generated Suggestion:", result[0]['generated_text'])
|