plebias commited on
Commit
2b8f60e
1 Parent(s): 01c834c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -14
app.py CHANGED
@@ -66,21 +66,22 @@ def visualize_entities(sentence):
66
 
67
  import gradio as gr
68
 
69
- exampleList = [
70
- 'Can you explain the significance of the BCR::ABL1 tyrosine kinase protein in the context of Imatinib therapy for chronic myeloid leukemia (CML)?',
71
- 'Famotidine is a histamine H2-receptor antagonist used in inpatient settings for prevention of stress ulcers and is showing increasing popularity because of its low cost.',
72
- 'A randomized Phase III trial demonstrated noninferiority of APF530 500 mg SC ( granisetron 10 mg ) to intravenous palonosetron 0.25 mg in preventing CINV in patients receiving MEC or HEC in acute ( 0 - 24 hours ) and delayed ( 24 - 120 hours ) settings , with activity over 120 hours .',
73
- 'What are the known interactions between Aspirin and the COX-1 enzyme?',
74
- 'Can you explain the mechanism of action of Metformin and its effect on the AMPK pathway?',
75
- 'Are there any genetic variations in the CYP2C9 gene that may influence the response to Warfarin therapy?',
76
- 'I am curious about the role of Herceptin in targeting the HER2/neu protein in breast cancer treatment. How does it work?',
77
- 'What are the common side effects associated with Lisinopril, an angiotensin-converting enzyme (ACE) inhibitor?',
78
- 'How does Ibuprofen affect the COX-2 enzyme compared to COX-1?',
79
- 'Are there any recent studies exploring the use of Pembrolizumab as an immune checkpoint inhibitor targeting PD-1?',
80
- 'I have heard about the SLC6A4 gene and its association with serotonin reuptake inhibitors (SSRIs) like Fluoxetine.',
81
- 'Could you provide insights into the BRAF mutation and its relevance in response to Vemurafenib treatment in melanoma patients?'
82
  ]
83
 
 
84
  footer = """
85
  LLMGeneLinker uses a domain-specific transformer like SciBERT finetuned on AllenAI drug dataset, BC5CDR disease, NCBI disease, DrugProt and GeneTAG datasets. The resulting SciBERT model performs Named Entity Recognition to tag drug, protein, gene, diseases in input text. Sentence embedding of SciBERT is then fed into BERT
86
  This was made during the <a target="_blank" href =https://www.sginnovate.com/event/hackathon-large-language-models-bio> LLMs for Bio Hackathon</a> organised by 4Catalyzer and SGInnovate.
@@ -97,8 +98,9 @@ with gr.Blocks() as demo:
97
  gr.Markdown(footer)
98
 
99
  txt = gr.Textbox(label="Input", lines=2, placeholder="Can you explain the significance of the BCR::ABL1 tyrosine kinase protein in the context of Imatinib therapy for chronic myeloid leukemia (CML)?")
100
- txt_3 = gr.HTML(label="Output")
101
  btn = gr.Button(value="Submit")
 
 
102
  btn.click(visualize_entities, inputs=txt, outputs=txt_3)
103
 
104
  gr.Markdown("## Text Examples")
 
66
 
67
  import gradio as gr
68
 
69
+ examplesList = [
70
+ "The BCR::ABL1 tyrosine kinase protein is significant in the context of Imatinib therapy for chronic myeloid leukemia (CML) due to its role as the target of Imatinib, which inhibits its activity and helps control the progression of CML.",
71
+ "Famotidine is a histamine H2-receptor antagonist used in inpatient settings for the prevention of stress ulcers and is gaining popularity due to its low cost and effectiveness in reducing gastric acid secretion.",
72
+ "A randomized Phase III trial demonstrated noninferiority of APF530 500 mg SC (granisetron 10 mg) to intravenous palonosetron 0.25 mg in preventing chemotherapy-induced nausea and vomiting (CINV) in patients receiving moderately or highly emetogenic chemotherapy (MEC or HEC) in both acute (0 - 24 hours) and delayed (24 - 120 hours) settings, with sustained activity over 120 hours.",
73
+ "The known interactions between Aspirin and the COX-1 enzyme involve the irreversible inhibition of COX-1, leading to reduced production of prostaglandins and thromboxane A2, which are involved in platelet aggregation and inflammation.",
74
+ "The mechanism of action of Metformin involves the activation of AMP-activated protein kinase (AMPK) in liver cells, which leads to decreased glucose production and increased glucose uptake in peripheral tissues, resulting in improved insulin sensitivity and reduced blood glucose levels.",
75
+ "Genetic variations in the CYP2C9 gene may influence the response to Warfarin therapy by affecting the metabolism of Warfarin in the liver, leading to variations in the drug's anticoagulant effect.",
76
+ "Herceptin targets the HER2/neu protein in breast cancer treatment and works by binding to the HER2 receptors on cancer cells, blocking their growth signals, and promoting immune-mediated destruction of the cancer cells.",
77
+ "The common side effects associated with Lisinopril, an angiotensin-converting enzyme (ACE) inhibitor, include dizziness, dry cough, hypotension, and an increased risk of hyperkalemia.",
78
+ "Ibuprofen affects the COX-2 enzyme differently compared to COX-1 by selectively inhibiting COX-2, which is responsible for inflammation, without significantly affecting COX-1, which plays a role in protecting the stomach lining.",
79
+ "Recent studies explore the use of Pembrolizab as an immune checkpoint inhibitor targeting PD-1 in various types of cancer, showing promising results in improving the antitumor immune response and increasing survival rates.",
80
+ "The SLC6A4 gene is associated with serotonin reuptake inhibitors (SSRIs) like Fluoxetine, and genetic variations in this gene may influence individual responses to SSRIs and affect their efficacy in treating depression and other psychiatric disorders.",
81
+ "Insights into the BRAF mutation and its relevance in response to Vemurafenib treatment in melanoma patients indicate that Vemurafenib, a BRAF inhibitor, is particularly effective in patients with the BRAF V600E mutation, leading to tumor regression and improved outcomes."
82
  ]
83
 
84
+
85
  footer = """
86
  LLMGeneLinker uses a domain-specific transformer like SciBERT finetuned on AllenAI drug dataset, BC5CDR disease, NCBI disease, DrugProt and GeneTAG datasets. The resulting SciBERT model performs Named Entity Recognition to tag drug, protein, gene, diseases in input text. Sentence embedding of SciBERT is then fed into BERT
87
  This was made during the <a target="_blank" href =https://www.sginnovate.com/event/hackathon-large-language-models-bio> LLMs for Bio Hackathon</a> organised by 4Catalyzer and SGInnovate.
 
98
  gr.Markdown(footer)
99
 
100
  txt = gr.Textbox(label="Input", lines=2, placeholder="Can you explain the significance of the BCR::ABL1 tyrosine kinase protein in the context of Imatinib therapy for chronic myeloid leukemia (CML)?")
 
101
  btn = gr.Button(value="Submit")
102
+ gr.Markdown("Output")
103
+ txt_3 = gr.HTML(label="Output")
104
  btn.click(visualize_entities, inputs=txt, outputs=txt_3)
105
 
106
  gr.Markdown("## Text Examples")