Spaces:
Sleeping
Sleeping
1-ARIjitS commited on
Commit ·
aa656dd
1
Parent(s): 86f6253
app.py updated
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ from utils import (
|
|
| 14 |
get_clinical_trials_related_to_diseases,
|
| 15 |
get_clinical_records_by_ids
|
| 16 |
)
|
| 17 |
-
from llm_res import get_short_summary_out_of_json_files
|
| 18 |
import json
|
| 19 |
import numpy as np
|
| 20 |
from sentence_transformers import SentenceTransformer
|
|
@@ -82,10 +82,13 @@ with st.container():
|
|
| 82 |
# 7. Use an LLM to get a summary of the clinical trials, in plain text format.
|
| 83 |
status.write("Getting a summary of the clinical trials...")
|
| 84 |
response = get_short_summary_out_of_json_files(json_of_clinical_trials)
|
| 85 |
-
print(f'Response from LLM: {response}')
|
| 86 |
-
status.write(f'Response from LLM: {response}')
|
| 87 |
# 8. Use an LLM to extract numerical data from the clinical trials (e.g. number of patients, number of deaths, etc.). Get summary statistics out of that.
|
| 88 |
status.write("Getting summary statistics of the clinical trials...")
|
|
|
|
|
|
|
|
|
|
| 89 |
# 9. Show the results to the user: graph of the diseases chosen, summary of the clinical trials, summary statistics of the clinical trials, and list of the details of the clinical trials considered
|
| 90 |
status.update(label="Done!", state="complete")
|
| 91 |
time.sleep(1)
|
|
|
|
| 14 |
get_clinical_trials_related_to_diseases,
|
| 15 |
get_clinical_records_by_ids
|
| 16 |
)
|
| 17 |
+
from llm_res import get_short_summary_out_of_json_files, tagging_insights_from_json
|
| 18 |
import json
|
| 19 |
import numpy as np
|
| 20 |
from sentence_transformers import SentenceTransformer
|
|
|
|
| 82 |
# 7. Use an LLM to get a summary of the clinical trials, in plain text format.
|
| 83 |
status.write("Getting a summary of the clinical trials...")
|
| 84 |
response = get_short_summary_out_of_json_files(json_of_clinical_trials)
|
| 85 |
+
print(f'Response from LLM summarization: {response}')
|
| 86 |
+
status.write(f'Response from LLM summarization: {response}')
|
| 87 |
# 8. Use an LLM to extract numerical data from the clinical trials (e.g. number of patients, number of deaths, etc.). Get summary statistics out of that.
|
| 88 |
status.write("Getting summary statistics of the clinical trials...")
|
| 89 |
+
response = tagging_insights_from_json(json_of_clinical_trials)
|
| 90 |
+
print(f'Response from LLM tagging: {response}')
|
| 91 |
+
status.write(f'Response from LLM tagging: {response}')
|
| 92 |
# 9. Show the results to the user: graph of the diseases chosen, summary of the clinical trials, summary statistics of the clinical trials, and list of the details of the clinical trials considered
|
| 93 |
status.update(label="Done!", state="complete")
|
| 94 |
time.sleep(1)
|