tushifire commited on
Commit
863545f
1 Parent(s): bd0bffa

Adding setfit changes

Browse files
Files changed (1) hide show
  1. README.md +16 -17
README.md CHANGED
@@ -1,44 +1,43 @@
1
  ---
2
- pipeline_tag: sentence-similarity
3
  tags:
4
  - sentence-transformers
5
  - feature-extraction
6
  - sentence-similarity
 
7
 
8
  ---
9
 
10
- # {MODEL_NAME}
11
 
12
- This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
 
13
 
14
  <!--- Describe your model here -->
15
 
16
  ## Usage (Sentence-Transformers)
17
 
18
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
 
20
  ```
21
  pip install -U sentence-transformers
 
22
  ```
23
 
24
  Then you can use the model like this:
25
 
26
  ```python
27
- from sentence_transformers import SentenceTransformer
28
- sentences = ["This is an example sentence", "Each sentence is converted"]
29
-
30
- model = SentenceTransformer('{MODEL_NAME}')
31
- embeddings = model.encode(sentences)
32
- print(embeddings)
33
- ```
34
-
35
 
 
 
 
36
 
37
- ## Evaluation Results
38
-
39
- <!--- Describe how your model was evaluated -->
40
-
41
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
42
 
43
 
44
  ## Training
 
1
  ---
2
+ pipeline_tag: text-classification
3
  tags:
4
  - sentence-transformers
5
  - feature-extraction
6
  - sentence-similarity
7
+ - Setfit
8
 
9
  ---
10
 
11
+ # {Setfit_youtube_comments}
12
 
13
+ This is a [Setfit](https://github.com/huggingface/setfit) model: It maps sentences to a n dimensional dense vector space and
14
+ can be used for classification of text into question or not_question class.
15
 
16
  <!--- Describe your model here -->
17
 
18
  ## Usage (Sentence-Transformers)
19
 
20
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) and setfit installed:
21
 
22
  ```
23
  pip install -U sentence-transformers
24
+ pip install setfit
25
  ```
26
 
27
  Then you can use the model like this:
28
 
29
  ```python
30
+ from setfit import SetFitModel
31
+ model = SetFitModel.from_pretrained("tushifire/setfit_youtube_comments_is_a_question")
 
 
 
 
 
 
32
 
33
+ # Run inference
34
+ preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])
35
+ print(preds)
36
 
37
+ preds = model(["""what video do I watch that takes the html_output and insert it into the actual html page?""",
38
+ "Why does for loop end without a break statement"])
39
+ print(preds)
40
+ ```
 
41
 
42
 
43
  ## Training