ArchitRastogi commited on
Commit
aa18202
1 Parent(s): 31f7ce4

fixed how to use model

Browse files
Files changed (1) hide show
  1. README.md +3 -4
README.md CHANGED
@@ -70,14 +70,13 @@ The model can be used with `model.encode` for generating embeddings. Below is an
70
  ```python
71
  # Load model directly
72
  from transformers import AutoTokenizer, AutoModel
73
-
74
- tokenizer = AutoTokenizer.from_pretrained("model name")
75
- model = AutoModel.from_pretrained("model name")
76
  text = "Duties of the president"
77
  inputs = tokenizer(text, return_tensors="pt")
78
  outputs = model(**inputs)
79
  #Printing the Embeddings
80
- print(output)
81
 
82
  ```
83
 
 
70
  ```python
71
  # Load model directly
72
  from transformers import AutoTokenizer, AutoModel
73
+ tokenizer = AutoTokenizer.from_pretrained("ArchitRastogi/BGE-Small-LegalEmbeddings-USCode")
74
+ model = AutoModel.from_pretrained("ArchitRastogi/BGE-Small-LegalEmbeddings-USCode")
 
75
  text = "Duties of the president"
76
  inputs = tokenizer(text, return_tensors="pt")
77
  outputs = model(**inputs)
78
  #Printing the Embeddings
79
+ print(outputs)
80
 
81
  ```
82