DmitrMakeev commited on
Commit
739886f
·
verified ·
1 Parent(s): 96393fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from flask import Flask, request, render_template_string, send_from_directory, jsonify
2
  from flask import render_template
3
  import sqlite3
4
  import os
@@ -87,15 +87,14 @@ def monitor():
87
  used_gb = used // (2**30)
88
  free_gb = free // (2**30)
89
 
90
- return jsonify({
91
- 'uploaded_files': files,
92
- 'uploaded_html_files': html_files,
93
- 'disk_space': {
94
- 'total': f"{total_gb} GB",
95
- 'used': f"{used_gb} GB",
96
- 'free': f"{free_gb} GB"
97
- }
98
- })
99
 
100
  if __name__ == '__main__':
101
  app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
 
1
+ from flask import Flask, request, render_template_string, send_from_directory, jsonify, render_template
2
  from flask import render_template
3
  import sqlite3
4
  import os
 
87
  used_gb = used // (2**30)
88
  free_gb = free // (2**30)
89
 
90
+ return render_template('monitor.html',
91
+ uploaded_files=files,
92
+ uploaded_html_files=html_files,
93
+ disk_space={
94
+ 'total': f"{total_gb} GB",
95
+ 'used': f"{used_gb} GB",
96
+ 'free': f"{free_gb} GB"
97
+ })
 
98
 
99
  if __name__ == '__main__':
100
  app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))