public CreateModel(Eevee.Data.EeveeContext context, NaturalLanguage.NN.INN textprocessor, IWebHostEnvironment environment, AudioAnalysis.Reader reader) { _context = context; _textprocessor = textprocessor; _environment = environment; _reader = reader; }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(options => { options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme; }).AddCookie(options => { options.LoginPath = "/Users/SignIn"; }); services.AddSession(); services.AddMemoryCache(); services.AddRazorPages().AddRazorRuntimeCompilation(); services.AddDbContext <EeveeContext>(options => options.UseSqlServer(Configuration.GetConnectionString("EeveeContext"))); NaturalLanguage.NN.INN W2v = new NaturalLanguage.NN.Word2Vec(); services.AddSingleton <NaturalLanguage.NN.INN>(W2v); AudioAnalysis.Reader reader = new AudioAnalysis.Reader(); services.AddSingleton <AudioAnalysis.Reader>(reader); }