def __init__(self, isDev=False): op = log().start("Initializing model and index") if isDev: self.intentModel = modelFactory.getModelWithAbbrQRAndSpeller_smdata_smmodel( ) else: self.intentModel = modelFactory.getBaselineModel() op.end("Done") self.aladdin = AladdinSearch() self.diag = {"modelid": self.intentModel.id} if isDev: self.diag["isDev"] = True
def compareAzureResourceRecognizerModelVsBaseLine(): compare(testset_queries, modelFactory.getModelWithAzureResourceRecognizer(), modelFactory.getBaselineModel())
def compareSmVsLgModels(): compare(testset_queries, modelFactory.getBaselineModel_sm(), modelFactory.getBaselineModel())
from flask import Flask, jsonify app = Flask(__name__) print("initializing") import modelFactory from modelBase import Suggestion cliModel = modelFactory.getBaselineModel() @app.route('/') def hello_world(): return 'Welcome to smart cloud shell! Please help with testing/labeling at https://bizqnabootcamp.azurewebsites.net/' @app.route('/cli/<string:query>') def cliWithCmd(query): result = cliModel.getLegacyResult(query) return jsonify(result) @app.route('/cli/help/<string:query>') def cliWithHelp(query): result = cliModel.getLegacyResult(query) return jsonify(result) print("localhost:5000 is serving")
def compareAbbrModelVsBaseLine(): compare(testset_queries, modelFactory.getModelWithAbbrQrVectorAssigned(), modelFactory.getBaselineModel())