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="youtube-clips">
<div>
<div className="yt-clip-label">Documentary</div>
<div className="yt-clip-label">Movie scene</div>
<YouTube
videoId="gr1ps0ooDhU"
videoId="pvAhRcUofDk"
opts={{
height: '90',
width: '150',
}}
onPlay={this.onSamplePlay.bind(this, "gr1ps0ooDhU")}
onPlay={this.onSamplePlay.bind(this, "pvAhRcUofDk")}
/>
</div>
<div>
<div className="yt-clip-label">Sports</div>
<div className="yt-clip-label">Movie scene</div>
<YouTube
videoId="MqqyD0nP1LQ"
videoId="CvvAftMZYKM"
opts={{
height: '90',
width: '150',
}}
onPlay={this.onSamplePlay.bind(this, "MqqyD0nP1LQ")}
onPlay={this.onSamplePlay.bind(this, "CvvAftMZYKM")}
/>
</div>
<div>
<div className="yt-clip-label">Music video</div>
<div className="yt-clip-label">Sport</div>
<YouTube
videoId="kJQP7kiw5Fk"
videoId="Pi-qitmfvlI"
opts={{
height: '90',
width: '150',
}}
onPlay={this.onSamplePlay.bind(this, "kJQP7kiw5Fk")}
onPlay={this.onSamplePlay.bind(this, "Pi-qitmfvlI")}
/>
</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:
x = frame["frame"]
frame["popularity"] = nima_model.get_assessment_score(x)
chosen_frames = sorted(frames, key=lambda k: k['popularity'], reverse=True)
chosen_frames = chosen_frames[0:n_frames]
chosen_frames.sort(key=lambda k: k['index'])
chosen_frames = []
for frame_0, frame_1 in zip(frames[0::2], frames[1::2]):
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]
@staticmethod