Spaces:
Sleeping
Sleeping
Update app.py
Browse files4 unmodified lines567891010 unmodified lines2122232425261 unmodified line282930313233344 unmodified linesapp = Flask(__name__)CORS(app)@app.route('/health')def health_check():10 unmodified linesreturn jsonify({"error": "Question is required"}), 400answer = generate_long_answer(question)return jsonify({"question": question, "answer": answer})except Exception as e:1 unmodified line@app.route('/get_video')def get_video():return redirect("demo2.mp4")if __name__ == '__main__':4 unmodified lines56789101110 unmodified lines222324252627281 unmodified line30313233343536374 unmodified linesapp = Flask(__name__)CORS(app)temp_data={}@app.route('/health')def health_check():10 unmodified linesreturn jsonify({"error": "Question is required"}), 400answer = generate_long_answer(question)temp_data['answered']=answerreturn jsonify({"question": question, "answer": answer})except Exception as e:1 unmodified line@app.route('/get_video')def get_video():print(temp_data['answered'])return redirect("https://videos.pexels.com/video-files/3052446/3052446-hd_1920_1080_30fps.mp4")if __name__ == '__main__':
app.py+4-1