Vikas01 commited on
Commit
8ecf185
·
1 Parent(s): 15a15ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +65 -23
app.py CHANGED
@@ -1,8 +1,50 @@
1
- # from PIL import Image
2
- from flask import *
3
- from flask_socketio import SocketIO,emit
4
 
5
- import face_recognition
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  # import cv2
7
  # import numpy as np
8
  # import csv
@@ -14,18 +56,18 @@ import face_recognition
14
 
15
  # import io
16
  # import streamlit as st
17
- # bytes_data=None
18
-
19
- app = Flask(__name__)
20
-
21
- app.config['SECRET_KEY'] = 'secret!'
22
- socket = SocketIO(app,async_mode="eventlet")
23
-
24
- @socket.on("connect")
25
- def test_connect():
26
- print("Connected")
27
- emit("my response", {"data": "Connected"})
28
-
29
  # @app.route('/at')
30
  # def attend():
31
  # # Face recognition variables
@@ -128,15 +170,15 @@ def test_connect():
128
  # # Render the table.html template and pass the attendance data
129
  # return render_template('attendance.html', attendance=attendance)
130
 
131
- @app.route("/")
132
- def home():
133
- #return render_template('index.html')
134
- return 'hello'
135
 
136
 
137
 
138
- if __name__ == '__main__':
139
- # Start Flask application
140
- socket.run(app,host="0.0.0.0", port=5000)
141
 
142
 
 
1
+ from flask import Flask, jsonify, render_template, request, send_file
 
 
2
 
3
+ app = Flask(__name__)
4
+
5
+
6
+ @app.route("/")
7
+ def index():
8
+ return 'hello'
9
+ # return render_template("index.html")
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ if __name__ == "__main__":
19
+ app.run(host="0.0.0.0", port=7860)
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ # # from PIL import Image
44
+ # from flask import *
45
+ # from flask_socketio import SocketIO,emit
46
+
47
+ # import face_recognition
48
  # import cv2
49
  # import numpy as np
50
  # import csv
 
56
 
57
  # import io
58
  # import streamlit as st
59
+ # # bytes_data=None
60
+ ####################################################
61
+ # app = Flask(__name__)
62
+
63
+ # app.config['SECRET_KEY'] = 'secret!'
64
+ # socket = SocketIO(app,async_mode="eventlet")
65
+
66
+ # @socket.on("connect")
67
+ # def test_connect():
68
+ # print("Connected")
69
+ # emit("my response", {"data": "Connected"})
70
+ #########################################################
71
  # @app.route('/at')
72
  # def attend():
73
  # # Face recognition variables
 
170
  # # Render the table.html template and pass the attendance data
171
  # return render_template('attendance.html', attendance=attendance)
172
 
173
+ # @app.route("/")
174
+ # def home():
175
+ # return render_template('index.html')
176
+
177
 
178
 
179
 
180
+ # if __name__ == '__main__':
181
+ # # Start Flask application
182
+ # socket.run(app,host="0.0.0.0", port=5000)
183
 
184