Spaces:
Runtime error
Runtime error
pietrocagnasso
commited on
Commit
•
eb3432f
1
Parent(s):
2bd5505
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def extract(s):
|
|
13 |
model = "pietrocagnasso/thext-pce-bio"
|
14 |
|
15 |
input = ":".join(s.split(":")[1:])
|
16 |
-
data = json.
|
17 |
|
18 |
h = Highlighter(model_name=model)
|
19 |
results = h.get_highlights(sentences=data["sentences"], context=data["context"])
|
@@ -22,40 +22,40 @@ def extract(s):
|
|
22 |
|
23 |
examples = [
|
24 |
"""CS:{
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
"""AI:{
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
"""BIO:{
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
]
|
60 |
|
61 |
demo = gr.Interface(
|
|
|
13 |
model = "pietrocagnasso/thext-pce-bio"
|
14 |
|
15 |
input = ":".join(s.split(":")[1:])
|
16 |
+
data = json.loads(input)
|
17 |
|
18 |
h = Highlighter(model_name=model)
|
19 |
results = h.get_highlights(sentences=data["sentences"], context=data["context"])
|
|
|
22 |
|
23 |
examples = [
|
24 |
"""CS:{
|
25 |
+
"sentences": ["Differences in the PNL may influence a rider's comfort when cycling.",
|
26 |
+
"This study measured the body posture and subjective rating values for various handle-height and PNL combinations to determine the optimal PNL.",
|
27 |
+
"The Duncan MRT result indicated that, when PNL ≥6\xa0cm, the handle height did not affect the stability.",
|
28 |
+
"No previous study has systematically examined the effects of PNL on cycling posture, body discomfort, and cycling stability.",
|
29 |
+
"If cycling stability is the primary consideration, we suggest that the 6-cm PNL is the optimal seat design.",
|
30 |
+
"Regarding cycling stability, the scale ranged from not unstable at all to the most unstable seat imaginable.",
|
31 |
+
"In summary, the protruding node length (PNL) is a crucial difference among various bicycle seats.",
|
32 |
+
"Fig.\xa04 shows that differences in cycling stability between the two handle types.",
|
33 |
+
"The subjective discomfort levels experienced in the perineum and ischial tuberosity were not affected by handle height.",
|
34 |
+
"In the experiment, we collected data regarding the body postures of riders, subjective discomfort ratings, and cycling stability after the participants rode a bicycle for 20\xa0min, using various handle heights and seat PNL combinations to identify the optimal PNL."],
|
35 |
+
"context": "This study examined body posture, subjective discomfort, and stability, requiring the participants to ride a stationary bicycle for 20\xa0min (cadence: 60\xa0rpm; workrate: 120\xa0W), using various combinations of two handle heights and five seat-protruding node lengths (PNLs). [SEP] When the participants were seated at PNL\xa0=\xa00 or 3\xa0cm, cycling using dropped handles was less stable compared with using straight handles; however, the handle height did not affect the cycling stability when the PNL was ≥6\xa0cm. [SEP] In the experiment, we collected data regarding the body postures of riders, subjective discomfort ratings, and cycling stability after the participants rode a bicycle for 20\xa0min, using various handle heights and seat PNL combinations to identify the optimal PNL. [SEP] Chen and Yeh (2012) have observed that the subjective discomfort rating for the buttocks area is relatively higher than those for the other parts of the body. [SEP] In this study, we hypothesized that an optimal PNL may exist for traditional seats; furthermore, seats involving protruding nodes that enable maintaining a proper degree of body stability, reducing discomfort in the perineal region, and guiding the trunk to bend forward during riding, thereby lightening the load on the ischial tuberosity. [SEP] Differences in the PNL may influence a rider's comfort when cycling. [SEP] In summary, the protruding node length (PNL) is a crucial difference among various bicycle seats. [SEP] In addition to PNL, the design variables for bicycle seats vary substantially and have not been thoroughly researched in previous studies, causing the understanding of the effect of PNL on riding posture and subjective ratings to be limited. [SEP] Traditional seats with a long protruding node provide riding stability (Bressel et\xa0al., 2009). [SEP] The contact between the seat and the buttocks is a critical cause of discomfort and pain. [SEP] After the participants rode a bicycle for 20\xa0min, they were immediately asked to provide the discomfort and stability scores. [SEP] The results showed that the PNL had significantly positive and negative correlations with the discomfort scores of the perineum (r\xa0=\xa00.994, p\xa0<\xa0.005) and ischial tuberosity (r\xa0=\xa0−0.914, p\xa0<\xa0.05), respectively. [SEP] Fig.\xa03 shows that the discomfort scores for the perineum and ischial tuberosity had positive (r\xa0=\xa00.994, p\xa0<\xa0.005) and negative (r\xa0=\xa0−0.914, p\xa0<\xa0.05) correlations with the PNL, respectively. [SEP] Conversely, when the participants were cycling with a seat PNL\xa0=\xa00 or 3\xa0cm, the dropped handles were more unstable than the straight handles."}""",
|
36 |
"""AI:{
|
37 |
+
"sentences": ["The main contribution of our paper is a verifiable ethical decision-making framework that implements a specified ethical decision policy.",
|
38 |
+
"We propose a method for, and have implemented a working prototype of, an ethical extension to a rational agent governing an unmanned aircraft (UA).",
|
39 |
+
"In our prototype, ethical reasoning was integrated into a BDI agent programming language via the agents’ plan selection mechanism.",
|
40 |
+
"Model checking has been used in\xa0 [20] for providing formal evidence for the certification of autonomous unmanned aircraft.",
|
41 |
+
"One of the reasons for selecting Gwendolen \xa0as the basis for our implementation language, Ethan, was that it provided the potential for formally verifying ethical decision-making.",
|
42 |
+
"In Section\xa0 3 we outline our formal theoretical framework for the implementation and verification of ethically constrained behaviour in autonomous systems and also point to some relationships of our framework to deontic logic.",
|
43 |
+
"To be able to reason about plans in terms of ethics we need a plan selection procedure that uses the substantive policy implied by the abstract policy.",
|
44 |
+
"We extended the Gwendolen \xa0language as follows: • We introduced a new data structure, E , into Gwendolen \xa0agent programs consisting of a set of ethical rules.",
|
45 |
+
"Further similar properties can be used to establish that the “most ethical” option is always chosen."],
|
46 |
+
"context": "Even if we enable autonomous systems to distinguish between more and less ethical alternatives, how can we be sure that they would choose right? We consider autonomous systems with a hybrid architecture in which the highest level of reasoning is executed by a rational (BDI) agent. [SEP] We implement a rational agent that incorporates a given ethical policy in its plan selection and show that we can formally verify that the agent chooses to execute, to the best of its beliefs, the most ethical available plan. [SEP] However, it is necessary to enable them to adhere to our human understanding of morality, despite there exists no obvious or easy way to accomplish this\xa0 [2–5]. [SEP] For non-autonomous systems, such as cars or manned aircraft, it is assumed that the operator of the system will satisfy the ethical standards of society, e.g., the pilot of a civilian aircraft does not intend to use the aircraft to commit murder, and will, if necessary, disregard legal restrictions for ethical reasons, e.g., the pilot will disregard the Rules of the Air in order to preserve human life. [SEP] Specifically, an autonomous system for an unmanned aircraft (consisting of a rational agent) was developed and formally verified using Agent Java PathFinder, a program model checker for rational agents\xa0 [30]. [SEP] In\xa0 [19,20] \xa0 formal verification is used to assess whether or not an autonomous system for an unmanned aircraft (UA) follows the specified “Rules of the Air”\xa0(ROA) that a pilot should follow\xa0 [23]. [SEP] Namely, the most ethical decision is not always the least unethical decision that can be made under the circumstances, but the least unethical course of action that can be feasibly accomplished under a deadline. [SEP] So, while the formal verification of safe and legal decision-making has been covered in previous papers, we now focus on the formal verification of ethical decision-making within autonomous systems controlling autonomous aircraft. [SEP] Formal verification involves proving or disproving that a system is compliant with a “formally specified property”: a requirement specified in a mathematical language. [SEP] The rational agent-based autonomous system in control of the unmanned aircraft was separated from lower level control systems (such as the autopilot). [SEP] The work here does demonstrate that an ethical policy can be incorporated within a BDI agent in such a way that adherence to the policy can be formally verified and so we can be certain the agent will always make the most ethical choices. [SEP] The agent can be provided with a particular ethical policy it uses to distinguish among possible plans and to select the most ethical plan for execution. [SEP] Before an autonomous system is allowed to operate in a shared environment with people or other autonomous systems, sufficient assurances have to be provided that it will always behave within acceptable legal, ethical, and social boundaries."}""",
|
47 |
"""BIO:{
|
48 |
+
"sentences": ["The single CFT outlier assigned to the distinct methylation cluster of myopericytoma/angioleioma.",
|
49 |
+
"Some hybrid lesions with histological features of CFT and inflammatory myofibroblastic tumors (IMT) have been reported suggesting a link between CFT and IMT [11-13].",
|
50 |
+
"The most convincing argument that CFT and IMT form a spectrum with CFT being the burned out end we found by methylation profiling showing overlapping methylation patterns.",
|
51 |
+
"This study investigated the relation between CFT and IMT by comparing the genome-wide methylation patterns of both CFT and IMT alongside myopericytoma, angioleiomyoma, leiomyoma and reactive soft tissue lesions.",
|
52 |
+
"To the best of our knowledge, three cases have been reported with coexisting histological patterns of CFT and IMT arguing that CFT is a late stage of IMT [11-13].",
|
53 |
+
"In conclusion, we could show by methylation profiling that CFT has the same epigenetic profile as IMT and support a relationship with CFT being probably a late, burned out stage of IMT irrespective of negative fusion gene analysis leading to lack of expression of the corresponding proteins in CFT.",
|
54 |
+
"Calcifying fibrous tumor (CFT) is a rare benign mesenchymal lesion occurring in both children and (young) adults [1-5].",
|
55 |
+
"Later on, these lesions were considered neoplastic and designated as calcifying fibrous tumor [6].",
|
56 |
+
"Calcifying fibrous tumor Inflammatory myofibroblastic tumor Fluorescence in situ hybridization Genome-wide methylation profiling The study was conducted in accordance with the Code of Conduct of the Federation of Medical Scientific Societies.",
|
57 |
+
"Leiomyoma and reactive lesions clustered separately."],
|
58 |
+
"context": "Additionally, genome-wide methylation patterns were investigated and compared with IMT (n\u202f=\u202f7), leiomyoma (n\u202f=\u202f7), angioleiomyoma (n\u202f=\u202f9), myopericytoma (n\u202f=\u202f7) and reactive soft tissue lesions (n\u202f=\u202f10) using unsupervised hierarchical cluster analysis and t distributed stochastic neighbor embedding. [SEP] In conclusion, DNA methylation profiling supports the concept that CFT and IMT represent both ends of a spectrum of one entity with CFT being the burn out stage of IMT. [SEP] However, genome-wide methylation analysis revealed overlapping methylation patterns of CFT and IMT forming a distinct homogeneous methylation cluster with exception of one case clustering with myopericytoma/angioleiomyoma. [SEP] This study investigated the relation between CFT and IMT by comparing the genome-wide methylation patterns of both CFT and IMT alongside myopericytoma, angioleiomyoma, leiomyoma and reactive soft tissue lesions. [SEP] Furthermore, we performed FISH for ALK, ROS1 and RET on CFTs as rearrangements of these genes are the genetic hallmark of IMT. [SEP] Some hybrid lesions with histological features of CFT and inflammatory myofibroblastic tumors (IMT) have been reported suggesting a link between CFT and IMT [11-13]. [SEP] Calcifying fibrous tumor (CFT) is a rare benign mesenchymal lesion occurring in both children and (young) adults [1-5]. [SEP] The control group consisted of IMT (n\u202f=\u202f7), leiomyoma (n\u202f=\u202f7), angioleiomyoma (n\u202f=\u202f9), myopericytoma (n\u202f=\u202f7) and reactive soft tissue lesions (n\u202f=\u202f10). [SEP] The tumors originated in the abdomen (n\u202f=\u202f4) and axilla (n\u202f=\u202f1). [SEP] Two patients were younger than 18\u202fyears old. [SEP] The ages ranged from 7 to 43\u202fyears, with a median of 20\u202fyears. [SEP] The most convincing argument that CFT and IMT form a spectrum with CFT being the burned out end we found by methylation profiling showing overlapping methylation patterns. [SEP] In conclusion, we could show by methylation profiling that CFT has the same epigenetic profile as IMT and support a relationship with CFT being probably a late, burned out stage of IMT irrespective of negative fusion gene analysis leading to lack of expression of the corresponding proteins in CFT. [SEP] To the best of our knowledge, three cases have been reported with coexisting histological patterns of CFT and IMT arguing that CFT is a late stage of IMT [11-13]. [SEP] Based on clinicopathological characteristics a relationship with inflammatory myofibroblastic tumor (IMT) has been suggested and subsequently controversially discussed [6,10,12-14]. [SEP] ALK rearrangement, or alternatively rearrangement of ROS1 and RET shown in 56–61.1%, 5.6–10% and 1.6% of investigated cases, respectively, are the driver genetic events in IMTs and FISH analysis can aid as diagnostic tool to confirm the diagnosis [17,18]."}"""
|
59 |
]
|
60 |
|
61 |
demo = gr.Interface(
|