YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
language: vi
license: apache-2.0
tags:
- vietnamese
- poem-analysis
- instruction-tuned
- flan-t5
datasets:
- kienhoang123/Vietnamese_Poem_Analysis_VN
---
# Instruction-Tuned T5 Model for Vietnamese Poem Analysis
This model was fine-tuned on kienhoang123/Vietnamese_Poem_Analysis_VN to analyze Vietnamese poetry using an instruction-based approach.
## Model Details
- **Base Model**: google/flan-t5-small
- **Training Data**: Vietnamese poem analysis dataset
- **Tasks**: Extract emotion, metaphor, setting, motion, and prompt from Vietnamese poems
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("kienhoang123/Poem_Analysis_Instruct_VN")
model = AutoModelForSeq2SeqLM.from_pretrained("kienhoang123/Poem_Analysis_Instruct_VN")
# Create an instruction-based input
instruction = '''
Below is an instruction that describes a task.
### Instruction:
Generate emotion, metaphor, setting, motion and prompt in Vietnamese for the following content.
### Input:
Your Vietnamese poem here
### Output:
'''
inputs = tokenizer(instruction, return_tensors="pt")
outputs = model.generate(**inputs, max_length=150)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
```
The output is formatted as: "emotion ||| metaphor ||| setting ||| motion ||| prompt"
- Downloads last month
- 2
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support