コード例 #1
0
def predictlarge():
    request_data = request.get_json()
    model_ans = request_data['model_ans']
    student_ans = request_data['student_ans']
    max_marks = request_data['max_marks']
    result = assess_answer(model_ans, student_ans, max_marks)
    return {'response': result}
コード例 #2
0
def test_large_correct(a,b):
    val = assess_answer(a,b,10)
    val = 10 -val
    assert val >= 2
コード例 #3
0
def test_small_correct(a,b):
    val = assess_answer(a,b,5)
    val = 5 -val
    assert val >= 1
コード例 #4
0
def test_large_correct(a,b):
    assert assess_answer(a,b,10) == 10
コード例 #5
0
def test_small_correct(a,b):
    assert assess_answer(a,b,5) == 5
コード例 #6
0
def func():
   info = assess_answer('I am a good Boy.The car is awesome','I am a bad Boy. I have a BMW.',5)
   print(info)
   return jsonify(info)