nimaafshar's picture
tokenizer updated
f72f303
raw history blame
No virus
32.7 kB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description" content="We’re on a journey to solve and democratize artificial intelligence through natural language.">
<meta property="fb:app_id" content="1321688464574422">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@huggingface">
<meta property="og:title" content="HooshvareLab/bert-fa-base-uncased-sentiment-digikala · Hugging Face">
<meta property="og:type" content="website">
<meta property="og:url" content="https://huggingface.co/HooshvareLab/bert-fa-base-uncased-sentiment-digikala">
<meta property="og:image" content="https://huggingface.co/front/thumbnails/v2-2.png">
<link rel="stylesheet" href="/front/build/style.3060608.css">
<link rel="preconnect" href="https://fonts.gstatic.com" />
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap"
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&display=swap"
rel="stylesheet"
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">
<title>
HooshvareLab/bert-fa-base-uncased-sentiment-digikala · Hugging Face
</title>
</head>
<body class="flex flex-col min-h-screen v2-model">
<header class="border-b border-gray-100 z-10">
<div class="container flex items-center h-16">
<div class="flex flex-1 items-center">
<a class="flex flex-none items-center mr-5 lg:mr-6" href="/">
<img alt="Hugging Face's logo" class="md:mr-2 w-7" src="/front/assets/huggingface_logo.svg">
<span class="hidden text-lg font-bold whitespace-nowrap md:block">Hugging Face</span>
class="v2-quick-search relative flex-1 lg:max-w-sm mr-2 md:mr-4"
search-type="all"
url="/api/quicksearch-html"
with-links="true"
autocomplete="off"
class="v2-quick-search-input w-full h-9 pl-8 pr-3 border border-gray-200 shadow-inner rounded-lg outline-none focus:ring-2 focus:shadow-xl placeholder-gray-400 focus:ring-inset"
name=""
placeholder="Search models, datasets, users..."
spellcheck="false"
/>
class="absolute left-2.5 top-2.5 text-gray-400"
d="M30 28.59L22.45 21A11 11 0 1 0 21 22.45L28.59 30zM5 14a9 9 0 1 1 9 9a9 9 0 0 1-9-9z"
<ul
class="v2-quick-search-results z-40 hidden absolute w-full overflow-hidden text-sm bg-white border border-gray-100 rounded-lg shadow-lg divide-y divide-gray-100"
role="listbox"
></ul>
<button
id="v2-phone-nav-button"
class="lg:hidden relative flex-none place-self-stretch flex items-center justify-center w-8"
type="button"
class="v2-phone-nav-icon-open"
width="22"
height="22"
<path d="M4 24h24v2H4z" fill="currentColor"></path>
<path d="M4 12h24v2H4z" fill="currentColor"></path>
<path d="M4 18h24v2H4z" fill="currentColor"></path>
<path d="M4 6h24v2H4z" fill="currentColor"></path>
class="v2-phone-nav-icon-close hidden"
width="1.1em"
height="1.1em"
d="M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"
</button>
<nav
aria-label="Main"
class="ml-auto hidden lg:block"
<ul class="flex items-center space-x-6">
class="flex items-center group hover:text-indigo-700"
href="/models"
class="mr-1.5 text-gray-400 group-hover:text-indigo-500"
Models
class="flex items-center group hover:text-red-700"
href="/datasets"
<svg
class="mr-1.5 text-gray-400 group-hover:text-red-500"
Datasets
<a
class="flex items-center group hover:text-gray-500"
href="/pricing"
>
Pricing
<li class="b-r">
class="v2-dropdown-button cursor-pointer hover:text-gray-500 flex items-center"
<svg alt=""
class="mr-2 text-gray-400 fill-current w-3"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
focusable="false"
role="img"
width="1em"
height="1em"
viewBox="0 0 11 8"
preserveAspectRatio="xMidYMid meet">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 1.5H0V0.5H11V1.5ZM11 7.5H0V6.5H11V7.5ZM0 4.5H11V3.5H0V4.5Z" />
Resources
<ul class="min-w-full w-52">
<li>
class="col-span-2 -mx-2 px-4 flex items-center font-semibold bg-gradient-to-r to-white h-7 text-blue-800 from-blue-50"
Website
href="/metrics"
Metrics
href="/languages"
Languages
href="/organizations"
<svg
Organizations
class="col-span-2 -mx-2 px-4 flex items-center font-semibold bg-gradient-to-r to-white h-7 text-yellow-800 from-yellow-50"
Community
href="https://discuss.huggingface.co/"
Forum
href="/blog"
Blog
href="https://github.com/huggingface"
GitHub
<div
class="col-span-2 -mx-2 px-4 flex items-center font-semibold bg-gradient-to-r to-white h-7 text-green-800 from-green-50"
Documentation
</div> <ul>
href="/docs"
Model Hub doc
href="https://api-inference.huggingface.co/docs/"
target="_blank"
Inference API doc
href="/transformers/"
Transformers doc
href="/docs/tokenizers/python/latest/"
Tokenizers doc
<li>
<a
class="v2-dropdown-entry flex items-center hover:bg-gray-50 cursor-pointer
hover:underline
px-3 py-1.5
"
href="/docs/datasets/"
>
Datasets doc
</a>
</li>
</ul>
<li>
<hr class="w-0.5 h-5 bg-gray-100" />
</li>
class="block cursor-pointer hover:text-gray-500"
href="/login"
Log In
<li>
<a
class="btn"
href="/join"
Sign Up
</nav> <div
id="v2-phone-nav-menu"
class="hidden lg:hidden z-20 fixed bg-white top-16 inset-0 overflow-y-auto"
<nav aria-label="Main">
<ul class="px-2 pb-4 space-y-4">
text-purple-800 bg-gradient-to-r from-purple-50 to-white h-7"
Account
<a class="btn w-full v2-dropdown-entry" href="/login">
Log In
<li>
<a class="btn w-full v2-dropdown-entry" href="/join">
Sign Up
</li>
class="-mx-2 flex items-center px-2 font-semibold text-blue-800
bg-gradient-to-r from-blue-50 to-white h-7"
Website
<a href="/models" class="btn w-full v2-dropdown-entry">
Models
<a href="/datasets" class="btn w-full v2-dropdown-entry">
viewBox="0 0 25 25"
<ellipse
cx="12.5"
cy="5"
fill-opacity="0.25"
rx="7.5"
ry="2"
></ellipse>
d="M12.5 15C16.6421 15 20 14.1046 20 13V20C20 21.1046 16.6421 22 12.5 22C8.35786 22 5 21.1046 5 20V13C5 14.1046 8.35786 15 12.5 15Z"
d="M12.5 7C16.6421 7 20 6.10457 20 5V11.5C20 12.6046 16.6421 13.5 12.5 13.5C8.35786 13.5 5 12.6046 5 11.5V5C5 6.10457 8.35786 7 12.5 7Z"
opacity="0.5"
d="M5.23628 12C5.08204 12.1598 5 12.8273 5 13C5 14.1046 8.35786 15 12.5 15C16.6421 15 20 14.1046 20 13C20 12.8273 19.918 12.1598 19.7637 12C18.9311 12.8626 15.9947 13.5 12.5 13.5C9.0053 13.5 6.06886 12.8626 5.23628 12Z"
fill="currentColor"
Datasets
<a href="/metrics" class="btn w-full v2-dropdown-entry">
d="M6 23H2a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1z"
d="M14 23h-4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v20a1 1 0 0 1-1 1z"
d="M22 23h-4a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1z"
Metrics
<a href="/languages" class="btn w-full v2-dropdown-entry">
d="M17 13H7a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2z"
d="M12 2a10 10 0 0 0-7.743 16.33l-1.964 1.963A1 1 0 0 0 3 22h9a10 10 0 0 0 0-20zM9 7h6a1 1 0 0 1 0 2H9a1 1 0 0 1 0-2zm6 10H9a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2zm2-4H7a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2z"
d="M15 17H9a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2zm0-8H9a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2z"
Languages
<a href="/organizations" class="btn w-full v2-dropdown-entry">
<svg
class="text-gray-400 mr-1.5"
d="M12 18a3.5 3.5 0 1 1 3.5-3.5A3.504 3.504 0 0 1 12 18z"
d="M14.64 16.772a3.452 3.452 0 0 1-5.28 0A4.988 4.988 0 0 0 7 21a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1a4.988 4.988 0 0 0-2.36-4.228z"
d="M21 12a.996.996 0 0 1-.664-.252L12 4.338l-8.336 7.41a1 1 0 0 1-1.328-1.496l9-8a.999.999 0 0 1 1.328 0l9 8A1 1 0 0 1 21 12z"
d="M12 4.338l-8 7.111V21a1 1 0 0 0 1 1h3a1 1 0 0 1-1-1a4.988 4.988 0 0 1 2.36-4.228A3.469 3.469 0 0 1 8.5 14.5a3.5 3.5 0 0 1 7 0a3.469 3.469 0 0 1-.86 2.272A4.988 4.988 0 0 1 17 21a1 1 0 0 1-1 1h3a1 1 0 0 0 1-1v-9.551z"
Organizations
<a href="/pricing" class="btn w-full v2-dropdown-entry">
Pricing
text-yellow-800 bg-gradient-to-r from-yellow-50 to-white h-7"
Community
<a href="https://discuss.huggingface.co/" class="btn w-full v2-dropdown-entry">
Forum
<a href="/blog" class="btn w-full v2-dropdown-entry">
Blog
<li class="space-y-2.5">
<div
class="-mx-2 flex items-center px-2 font-semibold
text-green-800 bg-gradient-to-r from-green-50 to-white h-7"
Documentation
<ul class="grid gap-2.5 grid-cols-2 content-start">
<a href="/docs" class="btn w-full v2-dropdown-entry">
Model Hub doc
<a href="https://api-inference.huggingface.co/docs/" class="btn w-full v2-dropdown-entry">
Inference API doc
<a href="/transformers/" class="btn w-full v2-dropdown-entry">
Transformers doc
<a href="/docs/tokenizers/python/latest/" class="btn w-full v2-dropdown-entry">
Tokenizers doc
</a>
<li>
<a href="/docs/datasets/" class="btn w-full v2-dropdown-entry">
Datasets doc
</a>
</li>
</ul>
</li>
</ul>
</nav>
</div> </div>
</header> <main class="flex flex-col flex-1 ">
<header class="bg-gradient-to-t from-gray-50 via-white to-white pt-10">
<div class="container relative">
<h1 class="flex items-center flex-wrap font-mono md:text-xl mb-3">
<div class="inline-flex items-center">
<img
class="w-4 h-4 rounded mr-1.5"
alt="'s picture"
src="https://aeiljuispo.cloudimg.io/v7/https://s3.amazonaws.com/moonup/production/uploads/1590841291530-5ecbae65968f6028e0559f8c.png?w&#x3D;200&amp;h&#x3D;200&amp;f&#x3D;face"
/>
<a href="/HooshvareLab" class="font-sans text-gray-400 hover:text-blue-600">
HooshvareLab
<div class="text-gray-300 mx-0.5">/</div>
<div class="font-semibold">
<a href="/HooshvareLab/bert-fa-base-uncased-sentiment-digikala">
bert-fa-base-uncased-sentiment-digikala
</a>
</div>
</h1>
<div class="flex flex-wrap mb-5">
from-white to-white text-gray-700 hover:to-gray-100
"
href="/models?filter=text-classification"
tag-id="text-classification"
<div class="flex items-center flex-none pl-2 bg-gradient-to-t to-white h-7 w-8
text-orange-500 from-red-50
">
<svg
</div>
Text Classification
href="/models?filter=pytorch"
tag-id="pytorch"
alt=""
class="inline-block ml-2 text-sm"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
focusable="false"
role="img"
width="0.83em"
height="1em"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 256 310"
<path
d="M218.281 90.106c50.292 50.292 50.292 130.969 0 181.61c-49.244 50.292-130.27 50.292-180.562 0s-50.292-131.318 0-181.61L127.825 0v45.053l-8.382 8.382l-59.721 59.722c-37.72 37.02-37.72 97.79 0 135.509c37.02 37.719 97.79 37.719 135.509 0c37.719-37.02 37.719-97.79 0-135.51l23.05-23.05zm-45.053-5.588c-9.259 0-16.764-7.505-16.764-16.764c0-9.258 7.505-16.764 16.764-16.764c9.258 0 16.764 7.506 16.764 16.764c0 9.259-7.506 16.764-16.764 16.764z"
fill="#EE4C2C"
></path>
PyTorch
from-red-50 to-red-50 text-red-800 hover:to-red-100
href="/models?filter=tf"
tag-id="tf"
<svg
class="inline-block ml-2 text-sm"
width="0.94em"
viewBox="0 0 256 274"
d="M145.726 42.065v42.07l72.861 42.07v-42.07l-72.86-42.07zM0 84.135v42.07l36.43 21.03V105.17L0 84.135zm109.291 21.035l-36.43 21.034v126.2l36.43 21.035v-84.135l36.435 21.035v-42.07l-36.435-21.034V105.17z"
fill="#E55B2D"
d="M145.726 42.065L36.43 105.17v42.065l72.861-42.065v42.065l36.435-21.03v-84.14zM255.022 63.1l-36.435 21.035v42.07l36.435-21.035V63.1zm-72.865 84.135l-36.43 21.035v42.07l36.43-21.036v-42.07zm-36.43 63.104l-36.436-21.035v84.135l36.435-21.035V210.34z"
fill="#ED8E24"
d="M145.726 0L0 84.135l36.43 21.035l109.296-63.105l72.861 42.07L255.022 63.1L145.726 0zm0 126.204l-36.435 21.03l36.435 21.036l36.43-21.035l-36.43-21.03z"
fill="#F8BF3C"
<span>
TensorFlow
from-green-50 to-green-50 text-green-800 hover:to-green-100
href="/models?filter=fa"
tag-id="fa"
fa
from-blue-50 to-blue-50 text-blue-800 hover:to-blue-100
href="/models?filter=license:apache-2.0"
tag-id="license:apache-2.0"
apache-2.0
<a class="
tag mr-1 mb-1 md:mr-1.5 md:mb-1.5 h-7 flex-none
from-purple-50 to-purple-50 text-purple-800 hover:to-purple-100
"
href="/models?filter=bert"
tag-id="bert"
>
<span>
bert
</span>
</a>
<div class="border-b border-gray-100">
<div class="flex items-center justify-between">
<div class="flex items-center h-12 -mb-px overflow-x-auto overflow-y-hidden">
class="tab-alternate active"
href="/HooshvareLab/bert-fa-base-uncased-sentiment-digikala"
class="uim-quaternary"
d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z"
opacity=".25"
d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z"
d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z"
Model card
<a
class="tab-alternate "
href="/HooshvareLab/bert-fa-base-uncased-sentiment-digikala/tree/main"
>
<svg
class="mr-1.5 text-gray-400"
viewBox="0 0 24 24"
class="uim-tertiary"
d="M21 19h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-8h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0 4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z"
opacity=".5"
class="uim-primary"
d="M9 19a1 1 0 0 1-1-1V6a1 1 0 0 1 2 0v12a1 1 0 0 1-1 1zm-6-4.333a1 1 0 0 1-.64-1.769L3.438 12l-1.078-.898a1 1 0 0 1 1.28-1.538l2 1.667a1 1 0 0 1 0 1.538l-2 1.667a.999.999 0 0 1-.64.231z"
Files and versions
</a>
<div class="relative hidden space-x-1.5 md:flex">
<div
class="v2-dropdown relative "
<button
class="v2-dropdown-button cursor-pointer btn text-sm"
slot="trigger"
type="button"
<svg
class="mr-1.5"
d="M31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9l7 7z"
d="M1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23l-7-7z"
d="M12.419 25.484L17.639 6l1.932.518L14.35 26z"
Use in transformers
</button><div
class="v2-dropdown-menu hidden absolute mt-1 min-w-full bg-white rounded-xl overflow-hidden shadow-lg z-10 border border-gray-100 right-0 top-full "
<ul class="min-w-full w-auto">
<div class="v2-to-clipboard" style="width: 700px;">
How to use from the
<a target="_blank" href="https://github.com/huggingface/transformers">🤗/transformers</a>
library:
<button
class="v2-to-clipboard-button text-sm underline flex items-center cursor-pointer text-gray-500"
>
<svg
class="mr-1"
<path
d="M25.7 9.3l-7-7A.908.908 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h16a2.006 2.006 0 0 0 2-2V10a.908.908 0 0 0-.3-.7zM18 4.4l5.6 5.6H18zM24 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6z"
fill="currentColor"
></path>
Copy to clipboard
</button>
<pre class="v2-to-clipboard-content whitespace-pre-line text-sm p-4 text-gray-700">
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("HooshvareLab/bert-fa-base-uncased-sentiment-digikala")
model = AutoModelForSequenceClassification.from_pretrained("HooshvareLab/bert-fa-base-uncased-sentiment-digikala")
<div class="border-b px-4 py-2 bg-gradient-to-r from-gray-50 to-white border-gray-200 flex justify-between items-center h-11">
<h3 class="font-semibold">
Or just clone the model repo
</h3>
</div>
<pre class="whitespace-pre-line text-sm p-4 text-gray-700">
git lfs install
git clone https://huggingface.co/HooshvareLab/bert-fa-base-uncased-sentiment-digikala
<div class="text-gray-500 text-xs">
# if you want to clone without large files – just their pointers
# prepend your git clone with the following env var:
GIT_LFS_SKIP_SMUDGE=1
</pre>
</ul>
</div></div>
</div>
</div>
</div>
</header><div
class="container relative space-y-4 flex flex-col md:grid md:gap-6 md:space-y-0 overflow-hidden
md:grid-cols-12
md:flex-1 md:grid-rows-full
"
<section class="pt-8 border-gray-100 md:col-span-7 pb-24">
<div class="lg:pr-20 xl:pr-24 2xl:pr-36">
<div class="prose">
<h1 id="parsbert-v20">ParsBERT (v2.0)</h1>
<p>A Transformer-based Model for Persian Language Understanding</p>
<p>We reconstructed the vocabulary and fine-tuned the ParsBERT v1.1 on the new Persian corpora in order to provide some functionalities for using ParsBERT in other scopes!
Please follow the <a href="https://github.com/hooshvare/parsbert">ParsBERT</a> repo for the latest information about previous and current models.</p>
<h2 id="persian-sentiment-digikala-snappfood-deepsentipers">Persian Sentiment [Digikala, SnappFood, DeepSentiPers]</h2>
<p>It aims to classify text, such as comments, based on their emotional bias. We tested three well-known datasets for this task: <code>Digikala</code> user comments, <code>SnappFood</code> user comments, and <code>DeepSentiPers</code> in two binary-form and multi-form types.</p>
<h3 id="digikala">Digikala</h3>
<p>Digikala user comments provided by <a href="https://www.digikala.com/opendata/">Open Data Mining Program (ODMP)</a>. This dataset contains 62,321 user comments with three labels: </p>
<th align="center">Label</th>
<th align="center">#</th>
<td align="center">no_idea</td>
<td align="center">10394</td>
<td align="center">not_recommended</td>
<td align="center">15885</td>
<td align="center">recommended</td>
<td align="center">36042</td>
<p><strong>Download</strong>
You can download the dataset from <a href="https://www.digikala.com/opendata/">here</a></p>
<h2 id="results">Results</h2>
<p>The following table summarizes the F1 score obtained by ParsBERT as compared to other models and architectures.</p>
<th align="center">Dataset</th>
<th align="center">ParsBERT v2</th>
<th align="center">ParsBERT v1</th>
<th align="center">mBERT</th>
<th align="center">DeepSentiPers</th>
<td align="center">Digikala User Comments</td>
<td align="center">81.72</td>
<td align="center">81.74*</td>
<td align="center">80.74</td>
<td align="center">-</td>
<h2 id="how-to-use-hugs">How to use :hugs:</h2>
<table>
<thead>
<tr>
<th>Task</th>
<th>Notebook</th>
</thead>
<tbody><tr>
<td>Sentiment Analysis</td>
<td><a href="https://colab.research.google.com/github/hooshvare/parsbert/blob/master/notebooks/Taaghche_Sentiment_Analysis.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></td>
</tr>
</tbody></table>
<h3 id="bibtex-entry-and-citation-info">BibTeX entry and citation info</h3>
<p>Please cite in publications as the following:</p>
<pre><code class="language-bibtex">@article{ParsBERT,
title={ParsBERT: Transformer-based Model for Persian Language Understanding},
author={Mehrdad Farahani, Mohammad Gharachorloo, Marzieh Farahani, Mohammad Manthouri},
journal={ArXiv},
year={2020},
volume={abs/2005.12515}
}</code></pre>
<h2 id="questions">Questions?</h2>
<p>Post a Github issue on the <a href="https://github.com/hooshvare/parsbert/issues">ParsBERT Issues</a> repo.</p>
</div>
<section class="pt-8 border-gray-100 md:col-span-5 pt-6 md:pb-24 md:pl-6 md:border-l order-first md:order-none">
<div class="mb-5 flex justify-between">
<dl>
<dt class="-mb-1 text-sm text-gray-500">
Downloads last month
</dt>
<dd class="font-semibold">
0
</dd>
</dl>
<div class="model-graph flex-none" style="width: 200px; height: 40px;">
<svg
viewbox="0 0 100 100"
width="100%"
height="100%"
preserveAspectRatio="none"
style="overflow: visible;"
>
<defs>
<linearGradient id="fill-gradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color: hsl(258, 100%, 67%); stop-opacity:0.5" />
<stop offset="100%" style="stop-color: hsl(258, 100%, 67%); stop-opacity:0.1" />
</linearGradient>
</defs>
<path d="M 0,76.25C 0.15000000000000002,76.25 2.7,76.25 3,76.25C 3.3,76.25 5.65,76.25 6,76.25C 6.35,76.25 9.65,76.25 10,76.25C 10.35,76.25 12.65,76.25 13,76.25C 13.35,76.25 16.65,76.25 17,76.25C 17.35,76.25 19.65,76.25 20,76.25C 20.35,76.25 23.65,76.25 24,76.25C 24.35,76.25 26.65,76.25 27,76.25C 27.35,76.25 30.65,76.25 31,76.25C 31.35,76.25 33.7,76.25 34,76.25C 34.3,76.25 36.65,76.25 37,76.25C 37.35,76.25 40.65,76.25 41,76.25C 41.35,76.25 43.65,76.25 44,76.25C 44.35,76.25 47.65,76.25 48,76.25C 48.35,76.25 50.65,76.25 51,76.25C 51.35,76.25 54.65,76.25 55,76.25C 55.35,76.25 57.65,76.25 58,76.25C 58.35,76.25 61.65,76.25 62,76.25C 62.35,76.25 64.7,76.25 65,76.25C 65.3,76.25 67.65,76.25 68,76.25C 68.35,76.25 71.65,76.25 72,76.25C 72.35,76.25 74.65,76.25 75,76.25C 75.35,76.25 78.65,76.25 79,76.25C 79.35,76.25 81.65,76.25 82,76.25C 82.35,76.25 85.65,76.25 86,76.25C 86.35,76.25 88.65,76.25 89,76.25C 89.35,76.25 92.65,76.25 93,76.25C 93.35,76.25 95.65,76.25 96,76.25C 96.35,76.25 99.8,76.25 100,76.25"
fill="none"
stroke="hsl(258, 100%, 67%)"
stroke-width="3"
<path d="M 0,100 0,76.25C 0.15000000000000002,76.25 2.7,76.25 3,76.25C 3.3,76.25 5.65,76.25 6,76.25C 6.35,76.25 9.65,76.25 10,76.25C 10.35,76.25 12.65,76.25 13,76.25C 13.35,76.25 16.65,76.25 17,76.25C 17.35,76.25 19.65,76.25 20,76.25C 20.35,76.25 23.65,76.25 24,76.25C 24.35,76.25 26.65,76.25 27,76.25C 27.35,76.25 30.65,76.25 31,76.25C 31.35,76.25 33.7,76.25 34,76.25C 34.3,76.25 36.65,76.25 37,76.25C 37.35,76.25 40.65,76.25 41,76.25C 41.35,76.25 43.65,76.25 44,76.25C 44.35,76.25 47.65,76.25 48,76.25C 48.35,76.25 50.65,76.25 51,76.25C 51.35,76.25 54.65,76.25 55,76.25C 55.35,76.25 57.65,76.25 58,76.25C 58.35,76.25 61.65,76.25 62,76.25C 62.35,76.25 64.7,76.25 65,76.25C 65.3,76.25 67.65,76.25 68,76.25C 68.35,76.25 71.65,76.25 72,76.25C 72.35,76.25 74.65,76.25 75,76.25C 75.35,76.25 78.65,76.25 79,76.25C 79.35,76.25 81.65,76.25 82,76.25C 82.35,76.25 85.65,76.25 86,76.25C 86.35,76.25 88.65,76.25 89,76.25C 89.35,76.25 92.65,76.25 93,76.25C 93.35,76.25 95.65,76.25 96,76.25C 96.35,76.25 99.8,76.25 100,76.25 L 100,100"
fill="url(#fill-gradient)"
stroke="none"
vector-effect="non-scaling-stroke"
/>
</div>
<div class="border-t pt-4 border-gray-100 bg-white">
<inference-widget
class="inference-widget"
endpoint="https://api-inference.huggingface.co"
data-model="HooshvareLab/bert-fa-base-uncased-sentiment-digikala"
data-mask-token="[MASK]"
data-pipeline-tag="text-classification"
data-api-token=""
data-should-update-url="true"
<div class="font-semibold flex items-center mb-2">
<div class="text-lg flex items-center">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="mr-1 text-yellow-500 fill-current" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="transform: rotate(360deg);">
<path d="M11 15H6l7-14v8h5l-7 14v-8z" fill="currentColor"></path>
</svg>
Hosted inference API
<a target="_blank" href="/docs">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class=" ml-1.5 text-sm text-gray-400" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32">
<path d="M17 22v-8h-4v2h2v6h-3v2h8v-2h-3z" fill="currentColor"></path>
<path d="M16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8z" fill="currentColor"></path>
<path d="M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4z" fill="currentColor"></path>
</svg>
</a>
</div>
<div class="flex items-center text-sm text-gray-500 mb-1.5">
<div class="inline-flex items-center space-x-0.5">
alt=""
class=""
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
fill="currentColor"
focusable="false"
role="img"
width="1em"
height="1em"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 32 32"
style="transform: rotate(360deg);"
<circle cx="10" cy="20" r="2" fill="currentColor"></circle>
<circle cx="10" cy="28" r="2" fill="currentColor"></circle>
<circle cx="10" cy="14" r="2" fill="currentColor"></circle>
<circle cx="28" cy="4" r="2" fill="currentColor"></circle>
<circle cx="22" cy="6" r="2" fill="currentColor"></circle>
<circle cx="28" cy="10" r="2" fill="currentColor"></circle>
<circle cx="20" cy="12" r="2" fill="currentColor"></circle>
<circle cx="28" cy="22" r="2" fill="currentColor"></circle>
<circle cx="26" cy="28" r="2" fill="currentColor"></circle>
<circle cx="20" cy="26" r="2" fill="currentColor"></circle>
<circle cx="22" cy="20" r="2" fill="currentColor"></circle>
<circle cx="16" cy="4" r="2" fill="currentColor"></circle>
<circle cx="4" cy="24" r="2" fill="currentColor"></circle>
<circle cx="4" cy="16" r="2" fill="currentColor"></circle>
<span>
Text Classification
</span>
<p class="
text-gray-500 ml-auto
hidden
">
Mask token: <code>[MASK]</code>
<form>
<div class="flex h-10">
<input
type="text"
name="text"
placeholder="Your sentence here..."
dir="auto"
class="flex-1 h-10 px-3 border border-gray-200 rounded-l-lg shadow-inner
outline-none focus:ring-1 focus:ring-inset focus:ring-indigo-200 focus:shadow-inner"
>
<button type="submit" class="flex items-center justify-center flex-none w-24 h-10 px-5
text-gray-800 border border-l-0 rounded-r-lg focus:outline-none
focus:ring ring-inset bg-gradient-to-b from-gray-100 to-gray-200
">
<svg
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img"
class="text-gray-600 animate-spin hidden"
width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"
>
<g fill="none"><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M12 19a7 7 0 1 0 0-14a7 7 0 0 0 0 14zm0 3c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10z" fill="currentColor"></path><path d="M12 22c5.523 0 10-4.477 10-10h-3a7 7 0 0 1-7 7v3z" fill="currentColor"></path><path d="M2 12C2 6.477 6.477 2 12 2v3a7 7 0 0 0-7 7H2z" fill="currentColor"></path></g>
</svg>
<span class="btn-text">Compute</span>
</button>
</div> </form>
<div class="js-model_loading hidden">
<div class="flex h-10">
<div
class="flex flex-1 items-center justify-center rounded-lg bg-gray-50 relative text-gray-600 shadow-inner">
<div class="js-progress transition-all absolute inset-y-0 left-0 w-52 bg-gradient-to-t bg-gradient-to-r from-purple-200 to-purple-100 rounded-lg "></div>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="text-purple-400 animate-spin mr-2 z-10" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none"><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M12 19a7 7 0 1 0 0-14a7 7 0 0 0 0 14zm0 3c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10z" fill="currentColor"></path><path d="M12 22c5.523 0 10-4.477 10-10h-3a7 7 0 0 1-7 7v3z" fill="currentColor"></path><path d="M2 12C2 6.477 6.477 2 12 2v3a7 7 0 0 0-7 7H2z" fill="currentColor"></path></g></svg>
<span class="z-10">Model is loading</span>
<div class="blankslate">
<div class="subtitle">
<span class="loaded hidden text-xs text-gray-500">This model is currently loaded and running on the Inference API.</span>
<span class="error hidden text-xs text-gray-500">⚠️ This model could not be loaded by the inference API. ⚠️</span>
<span class="unknown hidden text-xs text-gray-500">This model can be loaded on the Inference API on-demand.</span>
<div class="not-blankslate hidden">
<div class="compute-zone text-gray-400 text-xs"></div>
<div class="output-panel" dir="auto"></div>
<div class="bottom">
<pre class="output-zone hidden text-xs text-gray-600 bg-gray-100 p-2 rounded my-3"></pre>
<div class="api-zone hidden">
<p class="text-center font-semibold text-sm my-3">
<a href="/pricing">
⚡️ Upgrade your account to access the Inference API
</a>
</p>
<div class="flex items-center text-xs text-gray-500 mt-4">
<button class="flex items-center mr-3" data-toggle=".output-zone">
<path d="M31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9l7 7z" fill="currentColor"></path>
<path d="M1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23l-7-7z" fill="currentColor"></path>
<path d="M12.419 25.484L17.639 6l1.932.518L14.35 26z" fill="currentColor"></path>
JSON Output
<button class="flex items-center mr-3" data-toggle=".api-zone">
<path d="M8 9H4a2 2 0 0 0-2 2v12h2v-5h4v5h2V11a2 2 0 0 0-2-2zm-4 7v-5h4v5z" fill="currentColor"></path>
<path d="M22 11h3v10h-3v2h8v-2h-3V11h3V9h-8v2z" fill="currentColor"></path>
<path d="M14 23h-2V9h6a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-4zm0-7h4v-5h-4z" fill="currentColor"></path>
API Endpoint
<button class="flex items-center ml-auto js-fullscreen">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="mr-1" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32">
<path d="M22 16h2V8h-8v2h6v6z" fill="currentColor"></path>
<path d="M8 24h8v-2h-6v-6H8v8z" fill="currentColor"></path>
<path d="M26 28H6a2.002 2.002 0 0 1-2-2V6a2.002 2.002 0 0 1 2-2h20a2.002 2.002 0 0 1 2 2v20a2.002 2.002 0 0 1-2 2zM6 6v20h20.001L26 6z" fill="currentColor"></path>
</svg>
Maximize
</button>
</div>
</div>
</div>
<script class="widgetData">
[{"text":"به موقع تحویل شد و همه چیز خوب بود."},{"text":"سیب زمینی بی کیفیت بود."},{"text":"قیمت و کیفیت عالی"},{"text":"خوب نبود اصلا"}]
</inference-widget>
</div>
</section>
</div>
</main>
<script defer src="/front/build/bundle.3060608.js"></script>
<script>
if (! (
['localhost', 'huggingface.test'].includes(window.location.hostname)
|| window.location.hostname.includes('ngrok.io')
)) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ganalytics');
ganalytics('create', 'UA-83738774-2', 'auto');
ganalytics('send', 'pageview');
}
</script>
</body>
</html>