Update README.md
Browse files
README.md
CHANGED
|
@@ -156,7 +156,7 @@ model-index:
|
|
| 156 |
source:
|
| 157 |
name: Kaggle Evaluation Notebook
|
| 158 |
url: >-
|
| 159 |
-
https://www.kaggle.com/code/ravindranlogasanjeev/evaluation-logasanjeev-
|
| 160 |
---
|
| 161 |
|
| 162 |
# Emotion Analyzer Bert
|
|
@@ -176,7 +176,7 @@ Fine-tuned [BERT-base-uncased](https://huggingface.co/bert-base-uncased) on [GoE
|
|
| 176 |
|
| 177 |
## Try It Out
|
| 178 |
|
| 179 |
-
For accurate predictions with optimized thresholds, use the [Gradio demo](https://logasanjeev-
|
| 180 |
|
| 181 |
- **Input**: "I’m thrilled to win this award! 😄"
|
| 182 |
- **Output**: `excitement: 0.5836, joy: 0.5290`
|
|
@@ -263,7 +263,7 @@ import os
|
|
| 263 |
from huggingface_hub import hf_hub_download
|
| 264 |
from importlib import import_module
|
| 265 |
|
| 266 |
-
repo_id = "logasanjeev/
|
| 267 |
local_file = hf_hub_download(repo_id=repo_id, filename="inference.py")
|
| 268 |
|
| 269 |
current_dir = os.getcwd()
|
|
@@ -330,7 +330,7 @@ import os
|
|
| 330 |
from huggingface_hub import hf_hub_download
|
| 331 |
from importlib import import_module
|
| 332 |
|
| 333 |
-
repo_id = "logasanjeev/
|
| 334 |
local_file = hf_hub_download(repo_id=repo_id, filename="onnx_inference.py")
|
| 335 |
|
| 336 |
current_dir = os.getcwd()
|
|
@@ -407,7 +407,7 @@ def preprocess_text(text):
|
|
| 407 |
text = text.lower()
|
| 408 |
return text
|
| 409 |
|
| 410 |
-
repo_id = "logasanjeev/
|
| 411 |
model = BertForSequenceClassification.from_pretrained(repo_id)
|
| 412 |
tokenizer = BertTokenizer.from_pretrained(repo_id)
|
| 413 |
|
|
|
|
| 156 |
source:
|
| 157 |
name: Kaggle Evaluation Notebook
|
| 158 |
url: >-
|
| 159 |
+
https://www.kaggle.com/code/ravindranlogasanjeev/evaluation-logasanjeev-emotions-analyzer-bert/notebook
|
| 160 |
---
|
| 161 |
|
| 162 |
# Emotion Analyzer Bert
|
|
|
|
| 176 |
|
| 177 |
## Try It Out
|
| 178 |
|
| 179 |
+
For accurate predictions with optimized thresholds, use the [Gradio demo](https://logasanjeev-emotions-analyzer-bert-demo.hf.space). The demo now includes preprocessed text and the top 5 predicted emotions, in addition to thresholded predictions. Example predictions:
|
| 180 |
|
| 181 |
- **Input**: "I’m thrilled to win this award! 😄"
|
| 182 |
- **Output**: `excitement: 0.5836, joy: 0.5290`
|
|
|
|
| 263 |
from huggingface_hub import hf_hub_download
|
| 264 |
from importlib import import_module
|
| 265 |
|
| 266 |
+
repo_id = "logasanjeev/emotions-analyzer-bert"
|
| 267 |
local_file = hf_hub_download(repo_id=repo_id, filename="inference.py")
|
| 268 |
|
| 269 |
current_dir = os.getcwd()
|
|
|
|
| 330 |
from huggingface_hub import hf_hub_download
|
| 331 |
from importlib import import_module
|
| 332 |
|
| 333 |
+
repo_id = "logasanjeev/emotions-analyzer-bert"
|
| 334 |
local_file = hf_hub_download(repo_id=repo_id, filename="onnx_inference.py")
|
| 335 |
|
| 336 |
current_dir = os.getcwd()
|
|
|
|
| 407 |
text = text.lower()
|
| 408 |
return text
|
| 409 |
|
| 410 |
+
repo_id = "logasanjeev/emotions-analyzer-bert"
|
| 411 |
model = BertForSequenceClassification.from_pretrained(repo_id)
|
| 412 |
tokenizer = BertTokenizer.from_pretrained(repo_id)
|
| 413 |
|