-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
48 lines (41 loc) · 1.17 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
47
48
import argparse
from src.runner import InstacutRunner
if __name__ == "__main__":
parser = argparse.ArgumentParser()
# Argument for the input config.
parser.add_argument(
"-c",
"--config",
nargs="?",
help="Config to use. Defaults to 'instacut_config.json'",
default="instacut_config.json",
)
args = parser.parse_args()
config_file = args.config
instacut_runner = InstacutRunner(config_file)
input_url = "https://www.youtube.com/watch?v=e-P5IFTqB98&t=140s"
# Run the InstacutRunner
instacut_runner.run_all(input_url=input_url)
# ID, Version, Topic, Question, Options, Type
custom_questions = [
(
"101",
"0",
"Yellow submarines",
"How many yellow submarines are there in this frame?",
"",
"INT",
),
(
"102",
"0",
"Yellow submarines color",
"If you saw a Yellow Submarine underwater, what color would it be?",
"",
"STR",
),
]
instacut_runner.run_qa(
input_url=input_url,
custom_questions=custom_questions,
)