Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
-
if __name__ == '
|
| 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)
|