metadata
license: openrail
inference:
parameters:
temperature: 0.7
max_length: 24
language:
- en
library_name: transformers
pipeline_tag: text2text-generation
tags:
- text-generation-inference
widget:
- text: 'generate title: Importance, Dataset, AI'
example_title: Example 1
- text: 'generate title: Amazon, Product, Business'
example_title: Example 2
- text: 'generate title: History, Computer, Software'
example_title: Example 3
,,,python def generate_title(keywords): input_ids = tokenizer(keywords, return_tensors="pt", padding="longest", truncation=True, max_length=32).input_ids.to(device) outputs = model.generate( input_ids, num_beams=3, num_beam_groups=3, num_return_sequences=3, repetition_penalty=7.0, diversity_penalty=4.0, no_repeat_ngram_size=3, temperature=0.9, max_length=32 ) return tokenizer.batch_decode(outputs, skip_special_tokens=True)
keywords = 'This repository contains a fine-tuned model for generating high-quality product descriptions.' generate_title(keywords) ,,,