Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
This repository contains a trained Urdu paraphrasing model based on the BERT-based encoder-decoder architecture. The model has been fine-tuned on the Urdu Paraphrase Dataset and can generate paraphrases for given input sentences in Urdu.
Model Description
The model is built using the Hugging Face Transformers library and is trained on the BERT-base-uncased model. It employs an encoder-decoder architecture where the BERT model serves as the encoder, and another BERT model is used as the decoder. The model is trained to generate paraphrases by reconstructing the input sentences.
Usage
To use the trained model for paraphrasing Urdu sentences, you can follow the steps below:
Install the required dependencies by running the following command:
Load the trained model using the Hugging Face Transformers library:
from transformers import EncoderDecoderModel, BertTokenizer
# Load the model and tokenizer
model = EncoderDecoderModel.from_pretrained("mwz/UrduParaphraseBERT")
tokenizer = BertTokenizer.from_pretrained("mwz/UrduParaphraseBERT")
defparaphrase_urdu_sentence(sentence):
input_ids = tokenizer.encode(sentence, padding="longest", truncation=True, max_length=512, return_tensors="pt")
generated_ids = model.generate(input_ids=input_ids, max_length=128, num_beams=4, no_repeat_ngram_size=2)
paraphrase = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
return paraphrase
sentence = "ایک مثالی روشنی کا مشہور نقطہ آبادی چھوٹی چھوٹی سڑکوں میں اپنے آپ کو خوشگوار کرسکتی ہے۔"
paraphrased_sentence = paraphrase_urdu_sentence(sentence)
print(paraphrased_sentence)
Runs of mahwizzzz UrduParaphraseBERT on huggingface.co
6
Total runs
0
24-hour runs
0
3-day runs
3
7-day runs
2
30-day runs
More Information About UrduParaphraseBERT huggingface.co Model
UrduParaphraseBERT huggingface.co is an AI model on huggingface.co that provides UrduParaphraseBERT's model effect (), which can be used instantly with this mahwizzzz UrduParaphraseBERT model. huggingface.co supports a free trial of the UrduParaphraseBERT model, and also provides paid use of the UrduParaphraseBERT. Support call UrduParaphraseBERT model through api, including Node.js, Python, http.
UrduParaphraseBERT huggingface.co is an online trial and call api platform, which integrates UrduParaphraseBERT's modeling effects, including api services, and provides a free online trial of UrduParaphraseBERT, you can try UrduParaphraseBERT online for free by clicking the link below.
mahwizzzz UrduParaphraseBERT online free url in huggingface.co:
UrduParaphraseBERT is an open source model from GitHub that offers a free installation service, and any user can find UrduParaphraseBERT on GitHub to install. At the same time, huggingface.co provides the effect of UrduParaphraseBERT install, users can directly use UrduParaphraseBERT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.