Edit model card
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

import pandas as pd

import os

import torch

from transformers import T5Tokenizer, T5ForConditionalGeneration

from transformers.optimization import Adafactor

import time

import warnings

warnings.filterwarnings('ignore')

tokenizer = T5Tokenizer.from_pretrained('Sachinkelenjaguri/sa_T5_Table_to_text')

model = T5ForConditionalGeneration.from_pretrained('Sachinkelenjaguri/sa_T5_Table_to_text', return_dict=True)

def generate(text):

model.eval() input_ids = tokenizer.encode("WebNLG:{} ".format(text), return_tensors="pt") # Batch size 1

s = time.time() outputs = model.generate(input_ids) gen_text=tokenizer.decode(outputs[0]).replace('','').replace('','') elapsed = time.time() - s print('Generated in {} seconds'.format(str(elapsed)[:4]))

return gen_text

generate(' Russia | leader | Putin')

Downloads last month
5
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.