-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
46 lines (38 loc) · 1.28 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import logging
from utils import logger
from PyInquirer import prompt
from Data.main import dataProcess
from Recommendation.main import recommendation
from FeatureExtraction.main import featureExtractor
from TrailerDownloader.main import trailersDownloader
from FramesExtraction.frameExtractor import frameExtractor
modules = ['Dataset Generator', 'Video Frame Extraction',
'Visual Feature Extraction', 'Trailers Downloader', 'Recommendation']
def getUserInput():
questions = [
{
'type': 'list',
'name': 'Action',
'message': 'Choose your desired module:',
'choices': modules
},
]
userInputs = prompt(questions)
return userInputs
def __init__():
# Creating log file
logging.basicConfig(filename='logger.log', level=logging.INFO)
logger('Framework started!')
# Getting inputs from users
userInputs = getUserInput()['Action']
if userInputs == 'Dataset Generator':
dataProcess()
elif userInputs == 'Video Frame Extraction':
frameExtractor()
elif userInputs == 'Visual Feature Extraction':
featureExtractor()
elif userInputs == 'Trailers Downloader':
trailersDownloader()
elif userInputs == 'Recommendation':
recommendation()
__init__()