Commit e5848a59 authored by Chamodi Mandakini's avatar Chamodi Mandakini

Update routes.py

parent 5c93c493
...@@ -61,3 +61,28 @@ def process_image_skin(): ...@@ -61,3 +61,28 @@ def process_image_skin():
return render_template('results.html', result=prediction) return render_template('results.html', result=prediction)
return 'File uploaded successfully!' return 'File uploaded successfully!'
def docRec(disease, result, value):
df = pd.read_excel('docs\RELEVANTDOCTORS.xlsx')
# find rows that contain a keyword in a specific column
keyword = str(disease)
column_name = 'Disease'
rec = df[df[column_name].str.contains(keyword)]
rec = rec.iloc[:, 1:]
table_classes = 'table table-striped table-bordered table-hover'
if value =="skinT":
textshow= True
else:
textshow=False
if value == "lung":
show_button = True
# render the output in a table format
return render_template('results.html', rec=rec.to_html(index=False, classes=table_classes), result=result, show_button=show_button,textshow=textshow)
else:
show_button = False
return render_template('results.html', rec=rec.to_html(index=False, classes=table_classes), result=result, show_button=show_button,textshow=textshow)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment