LDM-SyntheticChestX-Ray / load_disease_info.py
lfolle's picture
small fix to video
44a5c17
raw
history blame
557 Bytes
import pandas as pd
def disease_info(disease_index):
df = pd.read_excel(r"disease_info.xlsx")
df = df[df["Disease"] == disease_index].iloc[0]
html_text = ""
html_text += "<h1>Diagnosis</h1>\n" + "<p>" + str(df["Diagnosis"]) + "</p>" + "<br><br>"
html_text += "<h1>Cause</h1>\n" + "<p>" + str(df["Cause"]) + "</p>" + "<br><br>"
html_text += "<h1>Symptoms</h1>\n" + "<p>" + str(df["Symptoms"]) + "</p>" + "<br><br>"
html_text += "<h1>Treatment</h1>\n" + "<p>" + str(df["Treatment"]) + "</p>" + "<br><br>"
return html_text