Spaces:
Runtime error
Runtime error
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 | |