在最后一帧停止CSS淡入淡出动画幻灯片放映

时间:2018-11-27 00:59:00

标签: css css-animations slideshow

我正在为背景图像处理CSS动画淡入效果。动画正常进行,但返回到第一帧。有没有办法在最后一帧之后停止它?

import pickle
from flask import Flask
from flask import request,jsonify,render_template,abort
import pandas as pd
from sklearn.externals import joblib
import json
import numpy as np
from importlib import util

app = Flask(__name__)

model = pickle.load(open("Final_Gait_Model.sav", "rb"))

@app.route('/')
def home():
    return render_template('index.html')

@app.route('/api', methods=['POST'])
def get_info_predict():

    features = []
    result = request.form

    L_Ank_Force_LHS = float(input('Left Ankle Force at LHS (N): '))
    features.append(L_Ank_Force_LHS)

    L_Ank_Moment_Z_LHS = float(input('Left Ankle Moment (Z-axis) at LHS (Nm): '))
    features.append(L_Ank_Moment_Z_LHS)

    L_Knee_Force_LHS = float(input('Left Knee Force at LHS (N): '))
    features.append(L_Knee_Force_LHS)

    L_Ank_Moment_Y_Stance=float(input('Left Ankle Moment (Y-axis) during stance (Nm): '))
    features.append(L_Ank_Moment_Y_Stance)

    L_Knee_Vel_Y_Stance=float(input('Left Knee Angular Velocity (Y-axis) during stance (deg/s): '))
    features.append(L_Knee_Vel_Y_Stance)

    L_Knee_Vel_Z_Stance=float(input('Left Knee Angular Velocity (Z-Axis) during stance (deg/s): '))
    features.append(L_Knee_Vel_Z_Stance)

    R_Ank_Moment_Y_Stance=float(input('Right Ankle Moment (Y-axis) during stance (Nm): '))
    features.append(R_Ank_Moment_Y_Stance)

    R_Knee_Vel_Y_Stance=float(input('Right Knee Angular Velocity (Y-axis) during stance (deg/s): '))
    features.append(R_Knee_Vel_Y_Stance)

    R_Knee_Vel_Z_Stance=float(input('Right Knee Angular Velocity (Z-axis) during stance (deg/s): '))
    features.append(R_Knee_Vel_Z_Stance)

    R_Ank_Force_RHS=float(input('Right Ankle Force at RHS (N): '))
    features.append(R_Ank_Force_RHS)

    R_Ank_Moment_Z_RHS=float(input('Right Ankle Moment (Z-axis) at RHS (Nm): '))
    features.append(R_Ank_Moment_Z_RHS)

    R_Knee_Force_RHS=float(input('Right Kneed Force at RHS (N): '))
    features.append(R_Knee_Force_RHS)

    features = input_to_one_hot(features)

    prediction = model.predict([features])[0]

    return json.dumps({'Injury Classisfication':prediction});


if __name__ == '__main__':
    app.run(port=8080, debug = True)

1 个答案:

答案 0 :(得分:0)

这是您需要的:

animation-fill-mode: forwards;