renamed AI_Model to AIModel for consistency, added it as a functioning drop-down select on settings page, added face_distance to db and code, put face_distance model_used into all classes ready for use
This commit is contained in:
@@ -12,7 +12,7 @@ from flask_login import login_required, current_user
|
||||
################################################################################
|
||||
# Class describing AI_MODEL in the database, and via sqlalchemy, connected to the DB as well
|
||||
################################################################################
|
||||
class AI_Model(db.Model):
|
||||
class AIModel(db.Model):
|
||||
__tablename__ = "ai_model"
|
||||
id = db.Column(db.Integer, primary_key=True )
|
||||
name = db.Column(db.String)
|
||||
@@ -20,6 +20,7 @@ class AI_Model(db.Model):
|
||||
def __repr__(self):
|
||||
return f"<id: {self.id}, name: {self.name}>"
|
||||
|
||||
|
||||
################################################################################
|
||||
# Class describing Settings in the database, and via sqlalchemy, connected to the DB as well
|
||||
################################################################################
|
||||
@@ -53,7 +54,7 @@ class SettingsForm(FlaskForm):
|
||||
import_path = StringField('Path(s) to import from:', [validators.DataRequired()])
|
||||
storage_path = StringField('Path to store sorted images to:', [validators.DataRequired()])
|
||||
recycle_bin_path = StringField('Path to temporarily store deleted images in:', [validators.DataRequired()])
|
||||
default_model = SelectField( 'default_model', choices=[(c.id, c.name) for c in AI_Model.query.order_by('id')] )
|
||||
default_model = SelectField( 'default_model', choices=[(c.id, c.name) for c in AIModel.query.order_by('id')] )
|
||||
default_threshold = StringField('Face Distance threshold (below is a match):', [validators.DataRequired()])
|
||||
submit = SubmitField('Save' )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user