ariG23498 HF Staff commited on
Commit
0dfeb58
·
verified ·
1 Parent(s): 4d387c8

Upload fastino_gliner2-base-v1_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. fastino_gliner2-base-v1_0.txt +17 -0
fastino_gliner2-base-v1_0.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ from gliner2 import GLiNER2
3
+
4
+ model = GLiNER2.from_pretrained("fastino/gliner2-base-v1")
5
+
6
+ # Extract entities
7
+ text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday."
8
+ result = extractor.extract_entities(text, ["company", "person", "product", "location"])
9
+
10
+ print(result)
11
+ ```
12
+
13
+ ERROR:
14
+ Traceback (most recent call last):
15
+ File "/tmp/fastino_gliner2-base-v1_0ocXynF.py", line 23, in <module>
16
+ from gliner2 import GLiNER2
17
+ ModuleNotFoundError: No module named 'gliner2'