Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
metadata:
title: Predict
example start: 1
example end: 3
documentation: "https://docassemble.org/docs/ml.html#predicting"
---
question: |
Enter some text.
fields:
- no label: phrase
---
mandatory: True
code: |
ml = SimpleTextMachineLearner(group_id='demo')
predictions = ml.predict(phrase)
---
mandatory: True
question: |
The prediction
subquestion: |
The text provided was:
> ${ phrase }
% if len(predictions):
The prediction was:
> ${ predictions[0] }
% else:
There is not enough training data
to make a prediction yet.
% endif
buttons:
- Restart: restart