JiaenLiu commited on
Commit
87a205e
1 Parent(s): 66791b6

Former-commit-id: e95cbc81622f36854334feb89608e69614fa0972

Files changed (1) hide show
  1. pipeline.py +6 -4
pipeline.py CHANGED
@@ -16,14 +16,16 @@ if args.link is None and args.local_path is None:
16
  print("need video source")
17
  exit()
18
 
19
- openai.api_key = "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"
 
20
  # openai.api_key = os.getenv("OPENAI_API_KEY")
21
 
22
  DOWNLOAD_PATH = args.download
23
  RESULT_PATH = args.result
24
  VIDEO_NAME = args.video_name
25
  n_threshold = 5000
26
- model_name = "text-davinci-003" # replace this to our own fintune model
 
27
 
28
 
29
  # get source audio
@@ -57,7 +59,7 @@ with open("{}/{}_en.txt".format(RESULT_PATH, VIDEO_NAME), 'r') as f:
57
  script_split = script_en.split('.')
58
 
59
  # Split the video script by sentences and create chunks within the token limit
60
- n_threshold = 4096 # Token limit for the GPT-3 model
61
  script_split = script_en.split('.')
62
 
63
  script_arr = []
@@ -78,7 +80,7 @@ for s in script_arr:
78
  model=model_name,
79
  prompt=prompt,
80
  temperature=0.1,
81
- max_tokens=2000,
82
  top_p=1.0,
83
  frequency_penalty=0.0,
84
  presence_penalty=0.0
 
16
  print("need video source")
17
  exit()
18
 
19
+ # openai.api_key = "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"
20
+ openai.api_key = "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"
21
  # openai.api_key = os.getenv("OPENAI_API_KEY")
22
 
23
  DOWNLOAD_PATH = args.download
24
  RESULT_PATH = args.result
25
  VIDEO_NAME = args.video_name
26
  n_threshold = 5000
27
+ # model_name = "text-davinci-003" # replace this to our own fintune model
28
+ model_name = "gpt-3.5-turbo"
29
 
30
 
31
  # get source audio
 
59
  script_split = script_en.split('.')
60
 
61
  # Split the video script by sentences and create chunks within the token limit
62
+ n_threshold = 2048 # Token limit for the GPT-3 model
63
  script_split = script_en.split('.')
64
 
65
  script_arr = []
 
80
  model=model_name,
81
  prompt=prompt,
82
  temperature=0.1,
83
+ max_tokens=2048,
84
  top_p=1.0,
85
  frequency_penalty=0.0,
86
  presence_penalty=0.0