sreepathi-ravikumar commited on
Commit
5c58195
·
verified ·
1 Parent(s): 179bd1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -24,7 +24,6 @@ def ask_question():
24
  return jsonify({"error": "Question is required"}), 400
25
 
26
  answer = generate_long_answer(question)
27
- print(answer)
28
  temp_data['answered']=answer
29
  return jsonify({"question": question, "answer": answer})
30
 
@@ -33,10 +32,14 @@ def ask_question():
33
 
34
  @app.route('/get_video')
35
  def get_video():
36
- video_path=temp_data.get("answered")
37
- print(video_path)
38
- return redirect()
 
 
 
 
39
 
40
 
41
- if __name__ == '__main__':
42
  app.run(host='0.0.0.0', port=7860)
 
24
  return jsonify({"error": "Question is required"}), 400
25
 
26
  answer = generate_long_answer(question)
 
27
  temp_data['answered']=answer
28
  return jsonify({"question": question, "answer": answer})
29
 
 
32
 
33
  @app.route('/get_video')
34
  def get_video():
35
+ video_lst=[
36
+ "https://videos.pexels.com/video-files/3571264/3571264-sd_640_360_30fps.mp4",
37
+ "https://videos.pexels.com/video-files/3052446/3052446-hd_1920_1080_30fps.mp4",
38
+ "https://videos.pexels.com/video-files/6394054/6394054-sd_960_480_24fps.mp4",
39
+
40
+ ]
41
+ return redirect(random.choice(video_lst))
42
 
43
 
44
+ if __name__ == '__main-__':
45
  app.run(host='0.0.0.0', port=7860)