VitalContribution commited on
Commit
154203b
·
verified ·
1 Parent(s): 8892948

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -3
README.md CHANGED
@@ -20,6 +20,22 @@ tags: []
20
  ## Base Model
21
  DistilBERT base model (uncased), a distilled version of BERT optimized for efficiency while maintaining performance.
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ## Training Details
24
  | Parameter | Value |
25
  |:----------|:------|
@@ -36,6 +52,3 @@ DistilBERT base model (uncased), a distilled version of BERT optimized for effic
36
  ### Model Evaluation
37
  <img src="https://cdn-uploads.huggingface.co/production/uploads/63ae02ff20176b2d21669dd6/lEXXQguN-8-VVrFnlmW5o.png" width="600" alt="Model Evaluation Image 1">
38
  <img src="https://cdn-uploads.huggingface.co/production/uploads/63ae02ff20176b2d21669dd6/A99ZeYAr1jb32YF_yBin8.png" width="600" alt="Model Evaluation Image 2">
39
-
40
- ##
41
- TODO: add how to use it
 
20
  ## Base Model
21
  DistilBERT base model (uncased), a distilled version of BERT optimized for efficiency while maintaining performance.
22
 
23
+ ## Usage
24
+ ```python
25
+ from transformers import pipeline
26
+
27
+ model_id = "VitalContribution/JokeDetectBERT"
28
+ pipe = pipeline('text-classification', model=model_id)
29
+
30
+ joke_questionmark = "What do elves learn in school? The elf-abet."
31
+
32
+ out = pipe(joke_questionmark)[0]
33
+ label = out['label']
34
+ confidence = out['score']
35
+ result = "JOKE" if label == 'LABEL_1' else "NO JOKE"
36
+ print(f"Prediction: {result} ({confidence:.2f})")
37
+ ```
38
+
39
  ## Training Details
40
  | Parameter | Value |
41
  |:----------|:------|
 
52
  ### Model Evaluation
53
  <img src="https://cdn-uploads.huggingface.co/production/uploads/63ae02ff20176b2d21669dd6/lEXXQguN-8-VVrFnlmW5o.png" width="600" alt="Model Evaluation Image 1">
54
  <img src="https://cdn-uploads.huggingface.co/production/uploads/63ae02ff20176b2d21669dd6/A99ZeYAr1jb32YF_yBin8.png" width="600" alt="Model Evaluation Image 2">