-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.py
More file actions
24 lines (20 loc) · 789 Bytes
/
engine.py
File metadata and controls
24 lines (20 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sys
from pipeline import run_pipeline
from pipeline.predict_on_single_document import predict_topics_on_a_single_document
def start():
text = "\nRun Pipeline: Press 0\nPredict on a Text Document: Press 1\nEnter your Value: "
user_input = input(text)
if user_input=='0':
print("\nPipeline Started!")
print("-----"*10)
run_pipeline.run()
print("Pipeline Successfully Executed!")
elif user_input=='1':
text = "\nChoose the Text Model: ['lsa', 'lda', 'nmf', 'all']\nEnter your Model Choice: "
model_name = input(text)
predict_topics_on_a_single_document(model_name)
else:
sys.exit("Incorrect Value Entered! Please Re-Run!")
if __name__=="__main__":
start()
sys.exit()