Spaces:
Runtime error
Runtime error
File size: 557 Bytes
e5a19d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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
|