Commit 69e87981 by Vik Paruchuri

Work on model file handling

parent e1e52e8f
......@@ -22,12 +22,15 @@ def create(text,score,prompt_string,model_path):
feature_ext, classifier = model_creator.extract_features_and_generate_model(e_set)
except:
results['errors'].append("feature extraction and model creation failed.")
try:
util_functions.create_directory(model_path)
model_creator.dump_model_to_file(prompt_string, feature_ext, classifier, text, score, args.model_path)
results['created']=True
full_path=os.path.join(base_path,model_path)
util_functions.create_directory(full_path)
model_creator.dump_model_to_file(prompt_string, feature_ext, classifier, text, score, full_path)
results['created']=True
"""
except:
results['errors'].append("could not write model to: {0}".format(model_path))
"""
return results
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment