I want to implement a machine learning model but i implement flask,i am getting this error template not found even though i have template folder. I have tried all the possible solution given on stack overflow but nothings works,please help me. The basic code is to run the index page and even that is not working.
from flask import Flask,render_template
app = Flask(__name__, template_folder="C:/Users/sweet/Music/Rumor_Detection_Project_Copy/Front_End/templates")
app.debug=False
@app.route('/')
def index():
with app.app_context(), app.test_request_context():
template = render_template('C:/Users/sweet/Music/Rumor_Detection_Project_Copy/Front_End/templates/index.html')
if __name__ == "__main__":
app.run()
Thing which I have tried are:
- Renaming templates to template
- Using the proper sub-directory
- Debug feature both on and off
- Catch statement for error 500
PLEASE HELP AS THIS IS THE BASIC AND I HAVE TO DO A LOT OF OTHER THINGS TOO