Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -429,6 +429,7 @@ def generate_video():
|
|
429 |
@app.route("/status", methods=["GET"])
|
430 |
def check_generation_status():
|
431 |
global TEMP_DIR
|
|
|
432 |
response = {"base64_video": "","text_prompt":"", "status": ""}
|
433 |
process_id = request.args.get('process_id', None)
|
434 |
|
@@ -464,6 +465,7 @@ def check_generation_status():
|
|
464 |
end_time = time.time()
|
465 |
total_time = round(end_time - start_time, 2)
|
466 |
print("Total time taken for execution:", total_time, " seconds")
|
|
|
467 |
return jsonify(response)
|
468 |
return jsonify({"error":"No process id provided"})
|
469 |
|
|
|
429 |
@app.route("/status", methods=["GET"])
|
430 |
def check_generation_status():
|
431 |
global TEMP_DIR
|
432 |
+
global start_time
|
433 |
response = {"base64_video": "","text_prompt":"", "status": ""}
|
434 |
process_id = request.args.get('process_id', None)
|
435 |
|
|
|
465 |
end_time = time.time()
|
466 |
total_time = round(end_time - start_time, 2)
|
467 |
print("Total time taken for execution:", total_time, " seconds")
|
468 |
+
response["time_taken"] = total_time
|
469 |
return jsonify(response)
|
470 |
return jsonify({"error":"No process id provided"})
|
471 |
|