Remove unused imports

This commit is contained in:
adamsvystun 2018-11-17 18:42:48 +01:00
parent 1e5252b8f0
commit f702fe9df8
3 changed files with 17 additions and 15 deletions

View file

@ -295,36 +295,36 @@ class App extends React.Component {
<div className="yt-clips-label">Or select one of sample videos:</div> <div className="yt-clips-label">Or select one of sample videos:</div>
<div className="youtube-clips"> <div className="youtube-clips">
<div> <div>
<div className="yt-clip-label">Documentary</div> <div className="yt-clip-label">Movie scene</div>
<YouTube <YouTube
videoId="gr1ps0ooDhU" videoId="pvAhRcUofDk"
opts={{ opts={{
height: '90', height: '90',
width: '150', width: '150',
}} }}
onPlay={this.onSamplePlay.bind(this, "gr1ps0ooDhU")} onPlay={this.onSamplePlay.bind(this, "pvAhRcUofDk")}
/> />
</div> </div>
<div> <div>
<div className="yt-clip-label">Sports</div> <div className="yt-clip-label">Movie scene</div>
<YouTube <YouTube
videoId="MqqyD0nP1LQ" videoId="CvvAftMZYKM"
opts={{ opts={{
height: '90', height: '90',
width: '150', width: '150',
}} }}
onPlay={this.onSamplePlay.bind(this, "MqqyD0nP1LQ")} onPlay={this.onSamplePlay.bind(this, "CvvAftMZYKM")}
/> />
</div> </div>
<div> <div>
<div className="yt-clip-label">Music video</div> <div className="yt-clip-label">Sport</div>
<YouTube <YouTube
videoId="kJQP7kiw5Fk" videoId="Pi-qitmfvlI"
opts={{ opts={{
height: '90', height: '90',
width: '150', width: '150',
}} }}
onPlay={this.onSamplePlay.bind(this, "kJQP7kiw5Fk")} onPlay={this.onSamplePlay.bind(this, "Pi-qitmfvlI")}
/> />
</div> </div>
<div> <div>

File diff suppressed because one or more lines are too long

View file

@ -182,9 +182,11 @@ class KeyFramesExtractor:
for frame in frames: for frame in frames:
x = frame["frame"] x = frame["frame"]
frame["popularity"] = nima_model.get_assessment_score(x) frame["popularity"] = nima_model.get_assessment_score(x)
chosen_frames = sorted(frames, key=lambda k: k['popularity'], reverse=True) chosen_frames = []
chosen_frames = chosen_frames[0:n_frames] for frame_0, frame_1 in zip(frames[0::2], frames[1::2]):
chosen_frames.sort(key=lambda k: k['index']) if frame_0["popularity"] > frame_1["popularity"]:
chosen_frames.append(frame_0)
chosen_frames.append(frame_1)
return [o["frame"] for o in chosen_frames] return [o["frame"] for o in chosen_frames]
@staticmethod @staticmethod