Spaces:
Runtime error
Runtime error
DeathDaDev
commited on
Commit
•
2e6dee6
1
Parent(s):
a618bb4
Add index route to display logs
Browse files
app.py
CHANGED
@@ -1,7 +1,20 @@
|
|
|
|
1 |
from flask import Flask, render_template
|
2 |
|
3 |
app = Flask(__name__)
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
@app.route("/")
|
6 |
def index():
|
7 |
return render_template("index.html")
|
|
|
1 |
+
import os
|
2 |
from flask import Flask, render_template
|
3 |
|
4 |
app = Flask(__name__)
|
5 |
|
6 |
+
@app.route("/")
|
7 |
+
def index():
|
8 |
+
logs = ""
|
9 |
+
with open("logs.txt", "r") as f:
|
10 |
+
logs = f.read()
|
11 |
+
return render_template("index.html", logs=logs)
|
12 |
+
|
13 |
+
if __name__ == "__main__":
|
14 |
+
app.run(host="0.0.0.0", port=5000, debug=True)
|
15 |
+
|
16 |
+
app = Flask(__name__)
|
17 |
+
|
18 |
@app.route("/")
|
19 |
def index():
|
20 |
return render_template("index.html")
|