<s> from flask import Flask , render_template , Response <EOL> from camera import Camera <EOL> app = Flask ( __name__ ) <EOL> @ app . route ( '<STR_LIT:/>' ) <EOL> def index ( ) : <EOL> """<STR_LIT>""" <EOL> return render_template ( '<STR_LIT>' ) <EOL> def gen ( camera ) : <EOL> """<STR_LIT>""" <EOL> while True : <EOL> frame = camera . get_frame ( ) <EOL> yield ( b'<STR_LIT>' <EOL> b'<STR_LIT>' + frame + b'<STR_LIT:\r\n>' ) <EOL> @ app . route ( '<STR_LIT>' ) <EOL> def video_feed ( ) : <EOL> """<STR_LIT>""" <EOL> return Response ( gen ( Camera ( ) ) , <EOL> mimetype = '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> app . run ( host = '<STR_LIT>' , debug = True , threaded = True ) </s>
