BioMike BioMikeUkr commited on
Commit
0100256
·
1 Parent(s): 5187656

new examples added

Browse files
interfaces/classification.py CHANGED
@@ -6,8 +6,17 @@ model = GLiNER.from_pretrained("knowledgator/gliner-multitask-v1.0").to("cpu")
6
  PROMPT_TEMPLATE = """Classify the given text having the following classes: {}"""
7
  classification_examples = [
8
  [
9
- "The sun is shining and the weather is warm today.",
10
- "Weather, Food, Technology",
 
 
 
 
 
 
 
 
 
11
  0.5
12
  ],
13
  [
@@ -19,6 +28,39 @@ classification_examples = [
19
  "Das Kind spielt im Park und genießt die frische Luft.",
20
  "Nature, Technology, Politics",
21
  0.5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ]
23
  ]
24
 
 
6
  PROMPT_TEMPLATE = """Classify the given text having the following classes: {}"""
7
  classification_examples = [
8
  [
9
+ """
10
+ "I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
11
+
12
+ The headphones themselves are remarkable. The noise-canceling feature works like a charm in the bustling city environment, and the 30-hour battery life means I don't have to charge them every day. Connecting them to my Samsung Galaxy S21 was a breeze, and the sound quality is second to none.
13
+
14
+ I also appreciated the customer service from Amazon when I had a question about the warranty. They responded within an hour and provided all the information I needed.
15
+
16
+ However, the headphones did not come with a hard case, which was listed in the product description. I contacted Amazon, and they offered a 10% discount on my next purchase as an apology.
17
+
18
+ Overall, I'd give these headphones a 4.5/5 rating and highly recommend them to anyone looking for top-notch quality in both product and service.""",
19
+ "positive review, negative review, neutral review",
20
  0.5
21
  ],
22
  [
 
28
  "Das Kind spielt im Park und genießt die frische Luft.",
29
  "Nature, Technology, Politics",
30
  0.5
31
+ ],
32
+ [
33
+ """
34
+ "Last night, we visited the new Italian restaurant downtown. The Margherita pizza was absolutely delightful, with a perfectly crisp crust and fresh basil.
35
+
36
+ However, the service was slow; it took over 20 minutes to take our order. The pasta arrived lukewarm, which was disappointing given the hype around this place.
37
+
38
+ On the bright side, the ambiance was cozy, and the wine selection was impressive. Overall, it was a mixed experience, but I might give it another try on a quieter evening."
39
+ """,
40
+ "Food Quality, Technology, Politics",
41
+ 0.5
42
+ ],
43
+ [
44
+ """
45
+ "Das Kind verbrachte den Nachmittag im Park und entdeckte einen kleinen Teich mit Enten. Es war wunderschön zu sehen, wie es die Natur erkundete.
46
+
47
+ Doch plötzlich störten die Geräusche einer Baustelle die ruhige Atmosphäre. Trotzdem spielte das Kind weiter, und ich genoss die frische Luft.
48
+
49
+ Solche Momente zeigen, wie wichtig es ist, Kinder in der Natur aufwachsen zu lassen."
50
+ """,
51
+ "Outdoor Activities, Gaming, Artificial Intelligence",
52
+ 0.5
53
+ ],
54
+ [
55
+ """
56
+ "I recently attended a healthcare technology conference. The keynote speaker demonstrated how AI is revolutionizing diagnostics, making it possible to detect rare diseases with incredible accuracy.
57
+
58
+ However, concerns about data privacy and ethical implications were also heavily discussed. Despite these challenges, the energy in the room was palpable as experts envisioned a future where AI saves millions of lives.
59
+
60
+ It was an inspiring event that showcased the potential of combining technology and healthcare innovation."
61
+ """,
62
+ "Artificial Intelligence, Music, Sports",
63
+ 0.5
64
  ]
65
  ]
66
 
interfaces/landing.py CHANGED
@@ -21,7 +21,7 @@ with gr.Blocks() as landing_interface:
21
  gr.Code(
22
  '''
23
  from gliner import GLiNER
24
- model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5")
25
  text = "Your text here"
26
  labels = ["person", "award", "date", "competitions", "teams"]
27
  entities = model.predict_entities(text, labels)
 
21
  gr.Code(
22
  '''
23
  from gliner import GLiNER
24
+ model = GLiNER.from_pretrained("knowledgator/gliner-multitask-v1.0")
25
  text = "Your text here"
26
  labels = ["person", "award", "date", "competitions", "teams"]
27
  entities = model.predict_entities(text, labels)
interfaces/ner.py CHANGED
@@ -30,11 +30,12 @@ Dr. Paul Hammond, a renowned neurologist at Johns Hopkins University, has recent
30
  """
31
 
32
  ner_examples = [
 
33
  [
34
  text5,
35
  "neurologist, scientist, gene, disease, biological process, city, journal, university",
36
- 0.5,
37
- False
38
  ],
39
  [
40
  text1,
@@ -47,6 +48,80 @@ ner_examples = [
47
  "cell line, protein, metric, substance",
48
  0.5,
49
  False
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ]]
51
 
52
  def merge_entities(entities):
 
30
  """
31
 
32
  ner_examples = [
33
+
34
  [
35
  text5,
36
  "neurologist, scientist, gene, disease, biological process, city, journal, university",
37
+ 0.4,
38
+ True
39
  ],
40
  [
41
  text1,
 
48
  "cell line, protein, metric, substance",
49
  0.5,
50
  False
51
+ ],
52
+ [
53
+ "Libretto by Marius Petipa, based on the 1822 novella ``Trilby, ou Le Lutin d'Argail`` by Charles Nodier, first presented by the Ballet of the Moscow Imperial Bolshoi Theatre on January 25/February 6 (Julian/Gregorian calendar dates), 1870, in Moscow with Polina Karpakova as Trilby and Ludiia Geiten as Miranda and restaged by Petipa for the Imperial Ballet at the Imperial Bolshoi Kamenny Theatre on January 17–29, 1871 in St. Petersburg with Adèle Grantzow as Trilby and Lev Ivanov as Count Leopold.",
54
+ "person, book, location, date, actor, character",
55
+ 0.3,
56
+ True,
57
+ ],
58
+ [
59
+ """
60
+ * Data Scientist, Data Analyst, or Data Engineer with 1+ years of experience.
61
+ * Experience with technologies such as Docker, Kubernetes, or Kubeflow
62
+ * Machine Learning experience preferred
63
+ * Experience with programming languages such as Python, C++, or SQL preferred
64
+ * Experience with technologies such as Databricks, Qlik, TensorFlow, PyTorch, Python, Dash, Pandas, or NumPy preferred
65
+ * BA or BS degree
66
+ * Active Secret OR Active Top Secret or Active TS/SCI clearance
67
+ """,
68
+ "software package, programing language, software tool, degree, job title",
69
+ 0.3,
70
+ False,
71
+ ],
72
+ [
73
+ "However, both models lack other frequent DM symptoms including the fibre-type dependent atrophy, myotonia, cataract and male-infertility.",
74
+ "disease, symptom",
75
+ 0.3,
76
+ False,
77
+ ],
78
+ [
79
+ "Synergy between signal transduction pathways is obligatory for expression of c-fos in B and T cell lines: implication for c-fos control via surface immunoglobulin and T cell antigen receptors.",
80
+ "DNA, RNA, cell line, cell type, protein",
81
+ 0.3,
82
+ False,
83
+ ],
84
+ [
85
+ "The choice of the encoder and decoder modules of dnpg can be quite flexible, for instance long short term memory networks (lstm) or convolutional neural network (cnn).",
86
+ "short acronym, long acronym",
87
+ 0.3,
88
+ False,
89
+ ],
90
+ [
91
+ "Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.",
92
+ "person, company, location, airplane",
93
+ 0.3,
94
+ True,
95
+ ],
96
+ [
97
+ "Feldman is a contributor to NBC Sports Boston's ``State of the Revs`` and ``Revolution Postgame Live`` programs as well as to 98.5 the SportsHub, SiriusXM FC's MLS coverage and to other New England and national radio outlets and podcasts.",
98
+ "person, company, location",
99
+ 0.3,
100
+ False,
101
+ ],
102
+ [
103
+ "On 25 July 1948, on the 39th anniversary of Bleriot's crossing of the English Channel, the Type 618 Nene-Viking flew Heathrow to Paris (Villacoublay) in the morning carrying letters to Bleriot's widow and son (secretary of the FAI), who met it at the airport.",
104
+ "date, location, person, organization",
105
+ 0.3,
106
+ False,
107
+ ],
108
+ [
109
+ "Leo & Ian won the 1962 Bathurst Six Hour Classic at Mount Panorama driving a Daimler SP250 sports car, (that year the 500 mile race for touring cars were held at Phillip Island)",
110
+ "person, date, location, organization, competition",
111
+ 0.3,
112
+ False,
113
+ ],
114
+ [
115
+ "The Shore Line route of the CNS & M until 1955 served, from south to north, the Illinois communities of Chicago, Evanston, Wilmette, Kenilworth, Winnetka, Glencoe, Highland Park, Highwood, Fort Sheridan, Lake Forest, Lake Bluff, North Chicago, Waukegan, Zion, and Winthrop Harbor as well as Kenosha, Racine, and Milwaukee (the ``KRM'') in Wisconsin.",
116
+ "location, organization, date",
117
+ 0.3,
118
+ False,
119
+ ],
120
+ [
121
+ "Comet C/2006 M4 (SWAN) is a non-periodic comet discovered in late June 2006 by Robert D. Matson of Irvine, California and Michael Mattiazzo of Adelaide, South Australia in publicly available images of the Solar and Heliospheric Observatory (SOHO).",
122
+ "person, organization, date, location",
123
+ 0.3,
124
+ False,
125
  ]]
126
 
127
  def merge_entities(entities):