-1

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

The flask app code is:

from flask import Flask, render_template
import numpy as np
app = Flask(__name__)
@app.route('/')
def home():
    return render_template("index1.html")
if __name__ == "__main__":
   app.run(debug = True)

The index1.html is:

<html>
<body>
<h1>This is index page...</h1>
</body>
</html>

1 Answers1

1

Flask requires a certain structure. All templates (html files) need to be in a directory templates. So, I assume your current structure is something like this

project/
|- app.py
|- index1.html

Correct? Change it to this

project/
|- templates/
|  |- index1.html
|- app.py
Badgy
  • 819
  • 4
  • 14