コード例 #1
0
    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
コード例 #2
0
def compareAzureResourceRecognizerModelVsBaseLine():
    compare(testset_queries,
            modelFactory.getModelWithAzureResourceRecognizer(),
            modelFactory.getBaselineModel())
コード例 #3
0
def compareSmVsLgModels():
    compare(testset_queries, modelFactory.getBaselineModel_sm(),
            modelFactory.getBaselineModel())
コード例 #4
0
ファイル: main.py プロジェクト: ProgLan/smartcloudshell
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")
コード例 #5
0
def compareAbbrModelVsBaseLine():
    compare(testset_queries, modelFactory.getModelWithAbbrQrVectorAssigned(),
            modelFactory.getBaselineModel())