Downloads · 30 days
40
1% of all-time downloads
timpal0l/xlm-roberta-base-faq-extractor
xlm-roberta-base-faq-extractor is a text classification model from timpal0l. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model is trained to determine whether a question/statement is a FAQ, in the domain of products, businesses, website faqs, etc. For e.g "What is the warranty of your product?" In contrast, daily questions such as…
Downloads · 30 days
40
1% of all-time downloads
All-time downloads
6.6K
Public
Parameters
278M
4.5 GB on disk
Likes
7
Public
Click a slice to open those files.
.bin1.1 GB · 50%
How the weights are stored.
F32278M · 100%
From the Hugging Face model README
This model is trained to determine whether a question/statement is a FAQ, in the domain of products, businesses, website faqs, etc.
For e.g "What is the warranty of your product?" In contrast, daily questions such as "how are you?", "what is your name?", or simple statements such as "this is a tree".
from transformers import pipeline
classifier = pipeline("text-classification", "timpal0l/xlm-roberta-base-faq-extractor")
label_map = {"LABEL_0" : False, "LABEL_1" : True}
documents = ["What is the warranty for iPhone15?",
"How old are you?",
"Nice to meet you",
"What is your opening hours?",
"What is your name?",
"The weather is nice"]
predictions = classifier(documents)
for p, d in zip(predictions, documents):
print(d, "--->", label_map[p["label"]])
What is the warranty for iPhone15? ---> True
How old are you? ---> False
Nice to meet you ---> False
What is your opening hours? ---> True
What is your name? ---> False
The weather is nice ---> False