Skip to content

Commit

Permalink
Filter .model files out of model folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatNerdUKnow committed Sep 27, 2020
1 parent b0f71bb commit 24763a3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions vmaf-gui/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,19 @@ private void Form1_Load(object sender, EventArgs e)
foreach (string model in models)
{
string safeName = model.Substring(8, model.Length - 8);
cmbModel.Items.Add(safeName);
if (!safeName.Contains(".model")&& safeName.Contains(".pkl"))
{
cmbModel.Items.Add(safeName);
}
}
try
{
cmbModel.SelectedIndex = 0;
}
catch
{
MessageBox.Show("There are no suitable models in the ./model folder");
}
cmbModel.SelectedIndex = 0;
}

private void button1_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 24763a3

Please sign in to comment.