persiannlp / mbert-base-parsinlu-entailment

huggingface.co
Total runs: 8
24-hour runs: 0
7-day runs: 1
30-day runs: -11
Model's Last Updated: September 24 2021
text-classification

Introduction of mbert-base-parsinlu-entailment

Model Details of mbert-base-parsinlu-entailment

Textual Entailment (مدل برای پاسخ به استلزام منطقی)

This is a model for textual entailment problems. Here is an example of how you can run this model:

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import numpy as np

labels = ["entails", "contradicts", "neutral"]
model_name_or_path = "persiannlp/mbert-base-parsinlu-entailment"
model = AutoModelForSequenceClassification.from_pretrained(model_name_or_path)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path,)


def model_predict(text_a, text_b):
    features = tokenizer( [(text_a, text_b)], padding="max_length", truncation=True, return_tensors='pt')
    output = model(**features)
    logits = output[0]
    probs = torch.nn.functional.softmax(logits, dim=1).tolist()
    idx = np.argmax(np.array(probs))
    print(labels[idx], probs)


model_predict(
    "این مسابقات بین آوریل و دسامبر در هیپودروم ولیفندی در نزدیکی باکرکی ، ۱۵ کیلومتری (۹ مایل) غرب استانبول برگزار می شود.",
    "در ولیفندی هیپودروم، مسابقاتی از آوریل تا دسامبر وجود دارد."
)

model_predict(
"آیا کودکانی وجود دارند که نیاز به سرگرمی دارند؟",
    "هیچ کودکی هرگز نمی خواهد سرگرم شود.",
)

model_predict(
    "ما به سفرهایی رفته ایم که در نهرهایی شنا کرده ایم",
    "علاوه بر استحمام در نهرها ، ما به اسپا ها و سونا ها نیز رفته ایم."
)

For more details, visit this page: https://github.com/persiannlp/parsinlu/

Runs of persiannlp mbert-base-parsinlu-entailment on huggingface.co

8
Total runs
0
24-hour runs
1
3-day runs
1
7-day runs
-11
30-day runs

More Information About mbert-base-parsinlu-entailment huggingface.co Model

More mbert-base-parsinlu-entailment license Visit here:

https://choosealicense.com/licenses/cc-by-nc-sa-4.0

mbert-base-parsinlu-entailment huggingface.co

mbert-base-parsinlu-entailment huggingface.co is an AI model on huggingface.co that provides mbert-base-parsinlu-entailment's model effect (), which can be used instantly with this persiannlp mbert-base-parsinlu-entailment model. huggingface.co supports a free trial of the mbert-base-parsinlu-entailment model, and also provides paid use of the mbert-base-parsinlu-entailment. Support call mbert-base-parsinlu-entailment model through api, including Node.js, Python, http.

mbert-base-parsinlu-entailment huggingface.co Url

https://huggingface.co/persiannlp/mbert-base-parsinlu-entailment

persiannlp mbert-base-parsinlu-entailment online free

mbert-base-parsinlu-entailment huggingface.co is an online trial and call api platform, which integrates mbert-base-parsinlu-entailment's modeling effects, including api services, and provides a free online trial of mbert-base-parsinlu-entailment, you can try mbert-base-parsinlu-entailment online for free by clicking the link below.

persiannlp mbert-base-parsinlu-entailment online free url in huggingface.co:

https://huggingface.co/persiannlp/mbert-base-parsinlu-entailment

mbert-base-parsinlu-entailment install

mbert-base-parsinlu-entailment is an open source model from GitHub that offers a free installation service, and any user can find mbert-base-parsinlu-entailment on GitHub to install. At the same time, huggingface.co provides the effect of mbert-base-parsinlu-entailment install, users can directly use mbert-base-parsinlu-entailment installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mbert-base-parsinlu-entailment install url in huggingface.co:

https://huggingface.co/persiannlp/mbert-base-parsinlu-entailment

Url of mbert-base-parsinlu-entailment

mbert-base-parsinlu-entailment huggingface.co Url

Provider of mbert-base-parsinlu-entailment huggingface.co

persiannlp
ORGANIZATIONS

Other API from persiannlp