Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Commit
•
be85188
1
Parent(s):
d9f92af
Update backup/backup.py
Browse files- backup/backup.py +1 -17
backup/backup.py
CHANGED
@@ -7,14 +7,6 @@ model = GLiNER.from_pretrained("urchade/gliner_mediumv2.1")
|
|
7 |
text = """
|
8 |
lenskart m: (0)9428002330 Lenskart Store,Surat m: (0)9723817060) e:lenskartsurat@gmail.com Store Address UG-4.Ascon City.Opp.Maheshwari Bhavan,Citylight,Surat-395007"""
|
9 |
|
10 |
-
# Labels for entity prediction
|
11 |
-
# # Most GLiNER models should work best when entity types are in lower case or title case
|
12 |
-
# labels = ["Person", "Mail", "Number", "Address", "Organization","Designation"]
|
13 |
-
|
14 |
-
# # Perform entity prediction
|
15 |
-
# entities = model.predict_entities(text, labels, threshold=0.5)
|
16 |
-
|
17 |
-
|
18 |
def NER_Model(text):
|
19 |
|
20 |
labels = ["Person", "Mail", "Number", "Address", "Organization","Designation","Link"]
|
@@ -64,12 +56,4 @@ def NER_Model(text):
|
|
64 |
processed_data['Address']=[', '.join(processed_data['Address'])]
|
65 |
processed_data['extracted_text']=[text]
|
66 |
|
67 |
-
return processed_data
|
68 |
-
|
69 |
-
# result=NER_Model(text)
|
70 |
-
# print(result)
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
7 |
text = """
|
8 |
lenskart m: (0)9428002330 Lenskart Store,Surat m: (0)9723817060) e:lenskartsurat@gmail.com Store Address UG-4.Ascon City.Opp.Maheshwari Bhavan,Citylight,Surat-395007"""
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
def NER_Model(text):
|
11 |
|
12 |
labels = ["Person", "Mail", "Number", "Address", "Organization","Designation","Link"]
|
|
|
56 |
processed_data['Address']=[', '.join(processed_data['Address'])]
|
57 |
processed_data['extracted_text']=[text]
|
58 |
|
59 |
+
return processed_data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|