Eason Lu commited on
Commit
63ecb0d
0 Parent(s):

Former-commit-id: 602f965fd7da76d45facdb3be08b0c840a7be707

.DS_Store ADDED
Binary file (8.2 kB). View file
 
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ /downloads
2
+ /results
README.md ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # PROJECT-T
2
+
finetune_data/starcraft words.xlsx ADDED
Binary file (17.8 kB). View file
 
finetune_data/words.csv ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ source_prmopt,prompt,source_completion,completion
2
+ Mag-field accelerator,help me translate this to Chinese: Mag-field accelerator\n\n###\n\n,锁定增伤,锁定增伤 END
3
+ Smart servos,help me translate this to Chinese: Smart servos\n\n###\n\n,变形加速,变形加速 END
4
+ Fusion Core,help me translate this to Chinese: Fusion Core\n\n###\n\n,VC(人族),VC(人族) END
5
+ Ship weapons,help me translate this to Chinese: Ship weapons\n\n###\n\n,舰船武器等级,舰船武器等级 END
6
+ Neosteel Armor,help me translate this to Chinese: Neosteel Armor\n\n###\n\n,建筑护甲,建筑护甲 END
7
+ Weapon refit,help me translate this to Chinese: Weapon refit\n\n###\n\n,大和炮,大和炮 END
8
+ Enhanced shockwaves,help me translate this to Chinese: Enhanced shockwaves\n\n###\n\n,EMP范围、碗儿,EMP范围、碗儿 END
9
+ Shield,help me translate this to Chinese: Shield\n\n###\n\n,盾,盾 END
10
+ Shadow stride,help me translate this to Chinese: Shadow stride\n\n###\n\n,隐刀闪现,隐刀闪现 END
11
+ Gravitic drive,help me translate this to Chinese: Gravitic drive\n\n###\n\n,棱镜速度,棱镜速度 END
12
+ Extended thermal lance,help me translate this to Chinese: Extended thermal lance\n\n###\n\n,巨像射程,巨像射程 END
13
+ Gravitic boosters,help me translate this to Chinese: Gravitic boosters\n\n###\n\n,ob速度,ob速度 END
14
+ Tectonic destabilizers,help me translate this to Chinese: Tectonic destabilizers\n\n###\n\n,风暴伤害,风暴伤害 END
15
+ Flux vanes,help me translate this to Chinese: Flux vanes\n\n###\n\n,虚空速度,虚空速度 END
16
+ Anion pulse-crystals,help me translate this to Chinese: Anion pulse-crystals\n\n###\n\n,凤凰射程,凤凰射程 END
17
+ Tunneling claws,help me translate this to Chinese: Tunneling claws\n\n###\n\n,蟑螂埋地,蟑螂埋地 END
18
+ Melee attacks,help me translate this to Chinese: Melee attacks\n\n###\n\n,近战攻击等级,近战攻击等级 END
19
+ Anabolic synthesis,help me translate this to Chinese: Anabolic synthesis\n\n###\n\n,大牛速度,大牛速度 END
20
+ Chitinous plating,help me translate this to Chinese: Chitinous plating\n\n###\n\n,牛甲,牛甲 END
21
+ Adrenal glands,help me translate this to Chinese: Adrenal glands\n\n###\n\n,狂狗,狂狗 END
22
+ Viper,help me translate this to Chinese: Viper\n\n###\n\n,飞蛇,飞蛇 END
23
+ Hydralisk,help me translate this to Chinese: Hydralisk\n\n###\n\n,刺蛇,刺蛇 END
24
+ Roach,help me translate this to Chinese: Roach\n\n###\n\n,钱赞企,钱赞企 END
25
+ Planetary Fortress,help me translate this to Chinese: Planetary Fortress\n\n###\n\n,大地堡,大地堡 END
26
+ Liberator,help me translate this to Chinese: Liberator\n\n###\n\n,无解者 / 解放,无解者 / 解放 END
27
+ Creep Tumor,help me translate this to Chinese: Creep Tumor\n\n###\n\n,菌毯,菌毯 END
28
+ Greater Spire,help me translate this to Chinese: Greater Spire\n\n###\n\n,大龙塔,大龙塔 END
29
+ Hive,help me translate this to Chinese: Hive\n\n###\n\n,三本,三本 END
30
+ Ultralisk Cavern,help me translate this to Chinese: Ultralisk Cavern\n\n###\n\n,牛塔,牛塔 END
31
+ Spire,help me translate this to Chinese: Spire\n\n###\n\n,VS、飞龙塔、龙塔,VS、飞龙塔、龙塔 END
32
+ Infestation Pit,help me translate this to Chinese: Infestation Pit\n\n###\n\n,VI,VI END
33
+ Lurker Den,help me translate this to Chinese: Lurker Den\n\n###\n\n,地刺塔,地刺塔 END
34
+ Hydralisk Den,help me translate this to Chinese: Hydralisk Den\n\n###\n\n,刺蛇塔,刺蛇塔 END
35
+ Roach Warren,help me translate this to Chinese: Roach Warren\n\n###\n\n,蟑螂巢,蟑螂巢 END
36
+ Spawning Pool,help me translate this to Chinese: Spawning Pool\n\n###\n\n,狗池,狗池 END
37
+ Evolution Chamber,help me translate this to Chinese: Evolution Chamber\n\n###\n\n,BV,BV END
38
+ Corruptor,help me translate this to Chinese: Corruptor\n\n###\n\n,腐化,腐化 END
39
+ Mutalisk,help me translate this to Chinese: Mutalisk\n\n###\n\n,飞龙,飞龙 END
40
+ Ultralisk,help me translate this to Chinese: Ultralisk\n\n###\n\n,(大)牛,(大)牛 END
41
+ Lurker,help me translate this to Chinese: Lurker\n\n###\n\n,地刺,地刺 END
42
+ Ravager,help me translate this to Chinese: Ravager\n\n###\n\n,火no / 火蟑螂,火no / 火蟑螂 END
43
+ Drone,help me translate this to Chinese: Drone\n\n###\n\n,农民,农民 END
44
+ Ground carapace,help me translate this to Chinese: Ground carapace\n\n###\n\n,地面单位甲壳等级,地面单位甲壳等级 END
45
+ Missile attacks,help me translate this to Chinese: Missile attacks\n\n###\n\n,喷射攻击等级,喷射攻击等级 END
46
+ Seismic spines,help me translate this to Chinese: Seismic spines\n\n###\n\n,地刺射程,地刺射程 END
47
+ Adaptive talons,help me translate this to Chinese: Adaptive talons\n\n###\n\n,地刺速埋,地刺速埋 END
48
+ Centrifugal hooks,help me translate this to Chinese: Centrifugal hooks\n\n###\n\n,毒爆速度,毒爆速度 END
49
+ Flyer attacks,help me translate this to Chinese: Flyer attacks\n\n###\n\n,飞行生物攻击等级,飞行生物攻击等级 END
50
+ Flyer carapace,help me translate this to Chinese: Flyer carapace\n\n###\n\n,飞行生物甲壳等级,飞行生物甲壳等级 END
51
+ Glial reconstitution,help me translate this to Chinese: Glial reconstitution\n\n###\n\n,蟑螂速度,蟑螂速度 END
52
+ Muscular augments,help me translate this to Chinese: Muscular augments\n\n###\n\n,刺蛇速度,刺蛇速度 END
53
+ Grooved spines,help me translate this to Chinese: Grooved spines\n\n###\n\n,刺蛇射程,刺蛇射程 END
54
+ Metabolic boost,help me translate this to Chinese: Metabolic boost\n\n###\n\n,狗速,狗速 END
55
+ Neural parasite,help me translate this to Chinese: Neural parasite\n\n###\n\n,同化完成,同化完成 END
56
+ Burrow,help me translate this to Chinese: Burrow\n\n###\n\n,埋地,埋地 END
57
+ Pathogen glands,help me translate this to Chinese: Pathogen glands\n\n###\n\n,感染能量,感染能量 END
58
+ Pneumatized carapace,help me translate this to Chinese: Pneumatized carapace\n\n###\n\n,房子速度,房子速度 END
59
+ Fleet Beacon,help me translate this to Chinese: Fleet Beacon\n\n###\n\n,VF,VF END
60
+ Stargate,help me translate this to Chinese: Stargate\n\n###\n\n,VS,VS END
61
+ Robotics Facility,help me translate this to Chinese: Robotics Facility\n\n###\n\n,VR,VR END
62
+ Twilight Council,help me translate this to Chinese: Twilight Council\n\n###\n\n,VC,VC END
63
+ Warpgate,help me translate this to Chinese: Warpgate\n\n###\n\n,BG、兵营,BG、兵营 END
64
+ Gateway,help me translate this to Chinese: Gateway\n\n###\n\n,BG / 兵营,BG / 兵营 END
65
+ Assimilator,help me translate this to Chinese: Assimilator\n\n###\n\n,气矿,气矿 END
66
+ Nexus,help me translate this to Chinese: Nexus\n\n###\n\n,基地,基地 END
67
+ Dark Shrine,help me translate this to Chinese: Dark Shrine\n\n###\n\n,VD、隐刀塔,VD、隐刀塔 END
68
+ Templar Archives,help me translate this to Chinese: Templar Archives\n\n###\n\n,VT、闪电塔,VT、闪电塔 END
69
+ Shield Battery,help me translate this to Chinese: Shield Battery\n\n###\n\n,电池,电池 END
70
+ Photon Cannon,help me translate this to Chinese: Photon Cannon\n\n###\n\n,地堡、光炮、炮台,地堡、光炮、炮台 END
71
+ Forge,help me translate this to Chinese: Forge\n\n###\n\n,BF,BF END
72
+ Pylon,help me translate this to Chinese: Pylon\n\n###\n\n,水晶,水晶 END
73
+ Mothership,help me translate this to Chinese: Mothership\n\n###\n\n,(大)妈妈船,(大)妈妈船 END
74
+ Mothership Core,help me translate this to Chinese: Mothership Core\n\n###\n\n,萝莉船 / 小妈妈船,萝莉船 / 小妈妈船 END
75
+ Tempest,help me translate this to Chinese: Tempest\n\n###\n\n,风暴,风暴 END
76
+ Void Ray,help me translate this to Chinese: Void Ray\n\n###\n\n,虚空,虚空 END
77
+ Observer,help me translate this to Chinese: Observer\n\n###\n\n,ob / 叮当,ob / 叮当 END
78
+ Disruptor,help me translate this to Chinese: Disruptor\n\n###\n\n,炸屎球 / 自爆球,炸屎球 / 自爆球 END
79
+ Immortal,help me translate this to Chinese: Immortal\n\n###\n\n,你爹者 / 不朽 / 不朽爸爸,你爹者 / 不朽 / 不朽爸爸 END
80
+ Archon,help me translate this to Chinese: Archon\n\n###\n\n,白球,白球 END
81
+ High Templar,help me translate this to Chinese: High Templar\n\n###\n\n,杨永信 / 闪电 / 电兵,杨永信 / 闪电 / 电兵 END
82
+ Sentry,help me translate this to Chinese: Sentry\n\n###\n\n,烧饼 / 哨兵,烧饼 / 哨兵 END
83
+ Stalker,help me translate this to Chinese: Stalker\n\n###\n\n,鸡猎 / 追猎,鸡猎 / 追猎 END
84
+ Zealot,help me translate this to Chinese: Zealot\n\n###\n\n,堂口兄弟 / 叉子 / 叉叉,堂口兄弟 / 叉子 / 叉叉 END
85
+ Carrier,help me translate this to Chinese: Carrier\n\n###\n\n,黄金舰队,黄金舰队 END
86
+ Barracks,help me translate this to Chinese: Barracks\n\n###\n\n,BB,BB END
87
+ Probe,help me translate this to Chinese: Probe\n\n###\n\n,探鸡 / 农民 / 探姬,探鸡 / 农民 / 探姬 END
88
+ Psionic storm,help me translate this to Chinese: Psionic storm\n\n###\n\n,闪电,闪电 END
89
+ Resonating glaives,help me translate this to Chinese: Resonating glaives\n\n###\n\n,使徒攻速,使徒攻速 END
90
+ Blink,help me translate this to Chinese: Blink\n\n###\n\n,blink,blink END
91
+ Charge,help me translate this to Chinese: Charge\n\n###\n\n,脚速,脚速 END
92
+ Ground armor,help me translate this to Chinese: Ground armor\n\n###\n\n,神族防,神族防 END
93
+ Ground weapons,help me translate this to Chinese: Ground weapons\n\n###\n\n,神族攻,神族攻 END
94
+ Air weapons,help me translate this to Chinese: Air weapons\n\n###\n\n,空中单位武器等级,空中单位武器等级 END
95
+ Air armor,help me translate this to Chinese: Air armor\n\n###\n\n,空中单位护甲等级,空中单位护甲等级 END
96
+ Dragoon,help me translate this to Chinese: Dragoon\n\n###\n\n,龙骑士,龙骑士 END
97
+ Oracle,help me translate this to Chinese: Oracle\n\n###\n\n,先知,先知 END
98
+ Phoenix,help me translate this to Chinese: Phoenix\n\n###\n\n,凤凰,凤凰 END
99
+ Colossus,help me translate this to Chinese: Colossus\n\n###\n\n,巨像,巨像 END
100
+ Adept,help me translate this to Chinese: Adept\n\n###\n\n,使徒,使徒 END
101
+ Reactor,help me translate this to Chinese: Reactor\n\n###\n\n,双倍挂件,双倍挂件 END
102
+ Armory,help me translate this to Chinese: Armory\n\n###\n\n,VA,VA END
103
+ Sensor Tower,help me translate this to Chinese: Sensor Tower\n\n###\n\n,圈,圈 END
104
+ Medivac Dropship,help me translate this to Chinese: Medivac Dropship\n\n###\n\n,妹子 / 运输机 / 医疗,妹子 / 运输机 / 医疗 END
105
+ Banshee,help me translate this to Chinese: Banshee\n\n###\n\n,女妖,女妖 END
106
+ Widow Mine,help me translate this to Chinese: Widow Mine\n\n###\n\n,地雷 / 雷,地雷 / 雷 END
107
+ Ghost,help me translate this to Chinese: Ghost\n\n###\n\n,鬼子 / 鬼兵,鬼子 / 鬼兵 END
108
+ Marauder,help me translate this to Chinese: Marauder\n\n###\n\n,光头,光头 END
109
+ Tech Lab,help me translate this to Chinese: Tech Lab\n\n###\n\n,科技挂件,科技挂件 END
110
+ Ghost Academy,help me translate this to Chinese: Ghost Academy\n\n###\n\n,VG,VG END
111
+ Bunker,help me translate this to Chinese: Bunker\n\n###\n\n,地堡,地堡 END
112
+ Engineering Bay,help me translate this to Chinese: Engineering Bay\n\n###\n\n,BE,BE END
113
+ Viking,help me translate this to Chinese: Viking\n\n###\n\n,味精 / 维京,味精 / 维京 END
114
+ Siege Tank,help me translate this to Chinese: Siege Tank\n\n###\n\n,坦克,坦克 END
115
+ Hellbat,help me translate this to Chinese: Hellbat\n\n###\n\n,你爹侠 / 火车侠,你爹侠 / 火车侠 END
116
+ Hellion,help me translate this to Chinese: Hellion\n\n###\n\n,火车,火车 END
117
+ Marine,help me translate this to Chinese: Marine\n\n###\n\n,(50块)好兄弟 / 枪兵 / 机枪,(50块)好兄弟 / 枪兵 / 机枪 END
118
+ Cloaking field,help me translate this to Chinese: Cloaking field\n\n###\n\n,隐形,隐形 END
119
+ Supply Depot,help me translate this to Chinese: Supply Depot\n\n###\n\n,房子,房子 END
120
+ Robotics Bay,help me translate this to Chinese: Robotics Bay\n\n###\n\n,VB,VB END
121
+ Cybernetics Core,help me translate this to Chinese: Cybernetics Core\n\n###\n\n,BY,BY END
122
+ Vehicle and ship plating,help me translate this to Chinese: Vehicle and ship plating\n\n###\n\n,战车及舰船钢板等级,战车及舰船钢板等级 END
123
+ Vehicle weapons,help me translate this to Chinese: Vehicle weapons\n\n###\n\n,战车武器等级,战车武器等级 END
124
+ Hi-Sec auto tracking,help me translate this to Chinese: Hi-Sec auto tracking\n\n###\n\n,建筑射程,建筑射程 END
125
+ Advanced ballistics,help me translate this to Chinese: Advanced ballistics\n\n###\n\n,解放射程,解放射程 END
126
+ Ignite afterburners,help me translate this to Chinese: Ignite afterburners\n\n###\n\n,医疗机速度,医疗机速度 END
127
+ Hyperflight rotors,help me translate this to Chinese: Hyperflight rotors\n\n###\n\n,女妖提速,女妖提速 END
128
+ Corvid reactor,help me translate this to Chinese: Corvid reactor\n\n###\n\n,铁鸦能量,铁鸦能量 END
129
+ Infernal pre-igniter,help me translate this to Chinese: Infernal pre-igniter\n\n###\n\n,蓝火,蓝火 END
130
+ Arm silo with nuke,help me translate this to Chinese: Arm silo with nuke\n\n###\n\n,核弹,核弹 END
131
+ Concussive shells,help me translate this to Chinese: Concussive shells\n\n###\n\n,震荡弹、减速,震荡弹、减速 END
132
+ Stimpack,help me translate this to Chinese: Stimpack\n\n###\n\n,兴奋剂、针,兴奋剂、针 END
133
+ Orbital command,help me translate this to Chinese: Orbital command\n\n###\n\n,星轨,星轨 END
134
+ Missile Turret,help me translate this to Chinese: Missile Turret\n\n###\n\n,防空,防空 END
135
+ Drilling claws,help me translate this to Chinese: Drilling claws\n\n###\n\n,速埋,速埋 END
136
+ Personal cloaking,help me translate this to Chinese: Personal cloaking\n\n###\n\n,隐形,隐形 END
137
+ Combat shield,help me translate this to Chinese: Combat shield\n\n###\n\n,盾,盾 END
138
+ War Hound,help me translate this to Chinese: War Hound\n\n###\n\n,战狼,战狼 END
139
+ Raven,help me translate this to Chinese: Raven\n\n###\n\n,渡鸦,渡鸦 END
140
+ Mule,help me translate this to Chinese: Mule\n\n###\n\n,矿螺,矿螺 END
141
+ Reaper,help me translate this to Chinese: Reaper\n\n###\n\n,死神,死神 END
142
+ Thor,help me translate this to Chinese: Thor\n\n###\n\n,雷神,雷神 END
143
+ Nydus Worm,help me translate this to Chinese: Nydus Worm\n\n###\n\n,虫洞 / 嗷嗷嗷,虫洞 / 嗷嗷嗷 END
144
+ Extractor,help me translate this to Chinese: Extractor\n\n###\n\n,气矿(虫族),气矿(虫族) END
145
+ Hatchery,help me translate this to Chinese: Hatchery\n\n###\n\n,基地(虫族),基地(虫族) END
146
+ Spore Crawler,help me translate this to Chinese: Spore Crawler\n\n###\n\n,防空,防空 END
147
+ Nydus Network,help me translate this to Chinese: Nydus Network\n\n###\n\n,虫洞,虫洞 END
148
+ Lair,help me translate this to Chinese: Lair\n\n###\n\n,二本,二本 END
149
+ Baneling Nest,help me translate this to Chinese: Baneling Nest\n\n###\n\n,毒爆塔,毒爆塔 END
150
+ Spine Crawler,help me translate this to Chinese: Spine Crawler\n\n###\n\n,管子,管子 END
151
+ Brood Lord,help me translate this to Chinese: Brood Lord\n\n###\n\n,大龙,大龙 END
152
+ Overlord,help me translate this to Chinese: Overlord\n\n###\n\n,气球 / 房子,气球 / 房子 END
153
+ Locust,help me translate this to Chinese: Locust\n\n###\n\n,小虫子,小虫子 END
154
+ Swarm Host,help me translate this to Chinese: Swarm Host\n\n###\n\n,宿主,宿主 END
155
+ Infestor,help me translate this to Chinese: Infestor\n\n###\n\n,橄榄(虫) / 感染(虫),橄榄(虫) / 感染(虫) END
156
+ Changeling,help me translate this to Chinese: Changeling\n\n###\n\n,二五仔,二五仔 END
157
+ Broodling,help me translate this to Chinese: Broodling\n\n###\n\n,小虫子,小虫子 END
158
+ Baneling,help me translate this to Chinese: Baneling\n\n###\n\n,黄旭东 / 毒爆,黄旭东 / 毒爆 END
159
+ Zergling,help me translate this to Chinese: Zergling\n\n###\n\n,(小)狗,(小)狗 END
160
+ Queen,help me translate this to Chinese: Queen\n\n###\n\n,武则天 / 女王,武则天 / 女王 END
161
+ Cocoon,help me translate this to Chinese: Cocoon\n\n###\n\n,卵,卵 END
162
+ Larva,help me translate this to Chinese: Larva\n\n###\n\n,卵,卵 END
163
+ Overseer,help me translate this to Chinese: Overseer\n\n###\n\n,眼虫,眼虫 END
164
+ Dark Templar,help me translate this to Chinese: Dark Templar\n\n###\n\n,非洲人 / 隐刀,非洲人 / 隐刀 END
165
+ Factory,help me translate this to Chinese: Factory\n\n###\n\n,VF(人族),VF(人族) END
166
+ Starport,help me translate this to Chinese: Starport\n\n###\n\n,VS(人族),VS(人族) END
167
+ Refinery,help me translate this to Chinese: Refinery\n\n###\n\n,气矿(人族),气矿(人族) END
168
+ Command Center,help me translate this to Chinese: Command Center\n\n###\n\n,基地(人族),基地(人族) END
169
+ Warp Prism,help me translate this to Chinese: Warp Prism\n\n###\n\n,50人口 / 棱镜,50人口 / 棱镜 END
170
+ Cyclone,help me translate this to Chinese: Cyclone\n\n###\n\n,导弹车 / 土方车 / 捣蛋车 / 人族快乐车,导弹车 / 土方车 / 捣蛋车 / 人族快乐车 END
171
+ Battle Cruiser,help me translate this to Chinese: Battle Cruiser\n\n###\n\n,人族快乐船 / 大和,人族快乐船 / 大和 END
172
+ SCV,help me translate this to Chinese: SCV\n\n###\n\n,人族最强近战 / 金刚毒龙钻 / 农民,人族最强近战 / 金刚毒龙钻 / 农民 END
173
+ Infantry armor,help me translate this to Chinese: Infantry armor\n\n###\n\n,人族防,人族防 END
174
+ Infantry weapons,help me translate this to Chinese: Infantry weapons\n\n###\n\n,人族攻,人族攻 END
finetune_data/words.xlsx ADDED
Binary file (20.5 kB). View file
 
finetune_data/words_prepared.jsonl ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"prompt":"help me translate this to Chinese: Mag-field accelerator\\n\\n###\\n\\n","completion":" 锁定增伤 END"}
2
+ {"prompt":"help me translate this to Chinese: Smart servos\\n\\n###\\n\\n","completion":" 变形加速 END"}
3
+ {"prompt":"help me translate this to Chinese: Fusion Core\\n\\n###\\n\\n","completion":" VC(人族) END"}
4
+ {"prompt":"help me translate this to Chinese: Ship weapons\\n\\n###\\n\\n","completion":" 舰船武器等级 END"}
5
+ {"prompt":"help me translate this to Chinese: Neosteel Armor\\n\\n###\\n\\n","completion":" 建筑护甲 END"}
6
+ {"prompt":"help me translate this to Chinese: Weapon refit\\n\\n###\\n\\n","completion":" 大和炮 END"}
7
+ {"prompt":"help me translate this to Chinese: Enhanced shockwaves\\n\\n###\\n\\n","completion":" EMP范围、碗儿 END"}
8
+ {"prompt":"help me translate this to Chinese: Shield\\n\\n###\\n\\n","completion":" 盾 END"}
9
+ {"prompt":"help me translate this to Chinese: Shadow stride\\n\\n###\\n\\n","completion":" 隐刀闪现 END"}
10
+ {"prompt":"help me translate this to Chinese: Gravitic drive\\n\\n###\\n\\n","completion":" 棱镜速度 END"}
11
+ {"prompt":"help me translate this to Chinese: Extended thermal lance\\n\\n###\\n\\n","completion":" 巨像射程 END"}
12
+ {"prompt":"help me translate this to Chinese: Gravitic boosters\\n\\n###\\n\\n","completion":" ob速度 END"}
13
+ {"prompt":"help me translate this to Chinese: Tectonic destabilizers\\n\\n###\\n\\n","completion":" 风暴伤害 END"}
14
+ {"prompt":"help me translate this to Chinese: Flux vanes\\n\\n###\\n\\n","completion":" 虚空速度 END"}
15
+ {"prompt":"help me translate this to Chinese: Anion pulse-crystals\\n\\n###\\n\\n","completion":" 凤凰射程 END"}
16
+ {"prompt":"help me translate this to Chinese: Tunneling claws\\n\\n###\\n\\n","completion":" 蟑螂埋地 END"}
17
+ {"prompt":"help me translate this to Chinese: Melee attacks\\n\\n###\\n\\n","completion":" 近战攻击等级 END"}
18
+ {"prompt":"help me translate this to Chinese: Anabolic synthesis\\n\\n###\\n\\n","completion":" 大牛速度 END"}
19
+ {"prompt":"help me translate this to Chinese: Chitinous plating\\n\\n###\\n\\n","completion":" 牛甲 END"}
20
+ {"prompt":"help me translate this to Chinese: Adrenal glands\\n\\n###\\n\\n","completion":" 狂狗 END"}
21
+ {"prompt":"help me translate this to Chinese: Viper\\n\\n###\\n\\n","completion":" 飞蛇 END"}
22
+ {"prompt":"help me translate this to Chinese: Hydralisk\\n\\n###\\n\\n","completion":" 刺蛇 END"}
23
+ {"prompt":"help me translate this to Chinese: Roach\\n\\n###\\n\\n","completion":" 钱赞企 END"}
24
+ {"prompt":"help me translate this to Chinese: Planetary Fortress\\n\\n###\\n\\n","completion":" 大地堡 END"}
25
+ {"prompt":"help me translate this to Chinese: Liberator\\n\\n###\\n\\n","completion":" 无解者 \/ 解放 END"}
26
+ {"prompt":"help me translate this to Chinese: Creep Tumor\\n\\n###\\n\\n","completion":" 菌毯 END"}
27
+ {"prompt":"help me translate this to Chinese: Greater Spire\\n\\n###\\n\\n","completion":" 大龙塔 END"}
28
+ {"prompt":"help me translate this to Chinese: Hive\\n\\n###\\n\\n","completion":" 三本 END"}
29
+ {"prompt":"help me translate this to Chinese: Ultralisk Cavern\\n\\n###\\n\\n","completion":" 牛塔 END"}
30
+ {"prompt":"help me translate this to Chinese: Spire\\n\\n###\\n\\n","completion":" VS、飞龙塔、龙塔 END"}
31
+ {"prompt":"help me translate this to Chinese: Infestation Pit\\n\\n###\\n\\n","completion":" VI END"}
32
+ {"prompt":"help me translate this to Chinese: Lurker Den\\n\\n###\\n\\n","completion":" 地刺塔 END"}
33
+ {"prompt":"help me translate this to Chinese: Hydralisk Den\\n\\n###\\n\\n","completion":" 刺蛇塔 END"}
34
+ {"prompt":"help me translate this to Chinese: Roach Warren\\n\\n###\\n\\n","completion":" 蟑螂巢 END"}
35
+ {"prompt":"help me translate this to Chinese: Spawning Pool\\n\\n###\\n\\n","completion":" 狗池 END"}
36
+ {"prompt":"help me translate this to Chinese: Evolution Chamber\\n\\n###\\n\\n","completion":" BV END"}
37
+ {"prompt":"help me translate this to Chinese: Corruptor\\n\\n###\\n\\n","completion":" 腐化 END"}
38
+ {"prompt":"help me translate this to Chinese: Mutalisk\\n\\n###\\n\\n","completion":" 飞龙 END"}
39
+ {"prompt":"help me translate this to Chinese: Ultralisk\\n\\n###\\n\\n","completion":" (大)牛 END"}
40
+ {"prompt":"help me translate this to Chinese: Lurker\\n\\n###\\n\\n","completion":" 地刺 END"}
41
+ {"prompt":"help me translate this to Chinese: Ravager\\n\\n###\\n\\n","completion":" 火no \/ 火蟑螂 END"}
42
+ {"prompt":"help me translate this to Chinese: Drone\\n\\n###\\n\\n","completion":" 农民 END"}
43
+ {"prompt":"help me translate this to Chinese: Ground carapace\\n\\n###\\n\\n","completion":" 地面单位甲壳等级 END"}
44
+ {"prompt":"help me translate this to Chinese: Missile attacks\\n\\n###\\n\\n","completion":" 喷射攻击等级 END"}
45
+ {"prompt":"help me translate this to Chinese: Seismic spines\\n\\n###\\n\\n","completion":" 地刺射程 END"}
46
+ {"prompt":"help me translate this to Chinese: Adaptive talons\\n\\n###\\n\\n","completion":" 地刺速埋 END"}
47
+ {"prompt":"help me translate this to Chinese: Centrifugal hooks\\n\\n###\\n\\n","completion":" 毒爆速度 END"}
48
+ {"prompt":"help me translate this to Chinese: Flyer attacks\\n\\n###\\n\\n","completion":" 飞行生物攻击等级 END"}
49
+ {"prompt":"help me translate this to Chinese: Flyer carapace\\n\\n###\\n\\n","completion":" 飞行生物甲壳等级 END"}
50
+ {"prompt":"help me translate this to Chinese: Glial reconstitution\\n\\n###\\n\\n","completion":" 蟑螂速度 END"}
51
+ {"prompt":"help me translate this to Chinese: Muscular augments\\n\\n###\\n\\n","completion":" 刺蛇速度 END"}
52
+ {"prompt":"help me translate this to Chinese: Grooved spines\\n\\n###\\n\\n","completion":" 刺蛇射程 END"}
53
+ {"prompt":"help me translate this to Chinese: Metabolic boost\\n\\n###\\n\\n","completion":" 狗速 END"}
54
+ {"prompt":"help me translate this to Chinese: Neural parasite\\n\\n###\\n\\n","completion":" 同化完成 END"}
55
+ {"prompt":"help me translate this to Chinese: Burrow\\n\\n###\\n\\n","completion":" 埋地 END"}
56
+ {"prompt":"help me translate this to Chinese: Pathogen glands\\n\\n###\\n\\n","completion":" 感染能量 END"}
57
+ {"prompt":"help me translate this to Chinese: Pneumatized carapace\\n\\n###\\n\\n","completion":" 房子速度 END"}
58
+ {"prompt":"help me translate this to Chinese: Fleet Beacon\\n\\n###\\n\\n","completion":" VF END"}
59
+ {"prompt":"help me translate this to Chinese: Stargate\\n\\n###\\n\\n","completion":" VS END"}
60
+ {"prompt":"help me translate this to Chinese: Robotics Facility\\n\\n###\\n\\n","completion":" VR END"}
61
+ {"prompt":"help me translate this to Chinese: Twilight Council\\n\\n###\\n\\n","completion":" VC END"}
62
+ {"prompt":"help me translate this to Chinese: Warpgate\\n\\n###\\n\\n","completion":" BG、兵营 END"}
63
+ {"prompt":"help me translate this to Chinese: Gateway\\n\\n###\\n\\n","completion":" BG \/ 兵营 END"}
64
+ {"prompt":"help me translate this to Chinese: Assimilator\\n\\n###\\n\\n","completion":" 气矿 END"}
65
+ {"prompt":"help me translate this to Chinese: Nexus\\n\\n###\\n\\n","completion":" 基地 END"}
66
+ {"prompt":"help me translate this to Chinese: Dark Shrine\\n\\n###\\n\\n","completion":" VD、隐刀塔 END"}
67
+ {"prompt":"help me translate this to Chinese: Templar Archives\\n\\n###\\n\\n","completion":" VT、闪电塔 END"}
68
+ {"prompt":"help me translate this to Chinese: Shield Battery\\n\\n###\\n\\n","completion":" 电池 END"}
69
+ {"prompt":"help me translate this to Chinese: Photon Cannon\\n\\n###\\n\\n","completion":" 地堡、光炮、炮台 END"}
70
+ {"prompt":"help me translate this to Chinese: Forge\\n\\n###\\n\\n","completion":" BF END"}
71
+ {"prompt":"help me translate this to Chinese: Pylon\\n\\n###\\n\\n","completion":" 水晶 END"}
72
+ {"prompt":"help me translate this to Chinese: Mothership\\n\\n###\\n\\n","completion":" (大)妈妈船 END"}
73
+ {"prompt":"help me translate this to Chinese: Mothership Core\\n\\n###\\n\\n","completion":" 萝莉船 \/ 小妈妈船 END"}
74
+ {"prompt":"help me translate this to Chinese: Tempest\\n\\n###\\n\\n","completion":" 风暴 END"}
75
+ {"prompt":"help me translate this to Chinese: Void Ray\\n\\n###\\n\\n","completion":" 虚空 END"}
76
+ {"prompt":"help me translate this to Chinese: Observer\\n\\n###\\n\\n","completion":" ob \/ 叮当 END"}
77
+ {"prompt":"help me translate this to Chinese: Disruptor\\n\\n###\\n\\n","completion":" 炸屎球 \/ 自爆球 END"}
78
+ {"prompt":"help me translate this to Chinese: Immortal\\n\\n###\\n\\n","completion":" 你爹者 \/ 不朽 \/ 不朽爸爸 END"}
79
+ {"prompt":"help me translate this to Chinese: Archon\\n\\n###\\n\\n","completion":" 白球 END"}
80
+ {"prompt":"help me translate this to Chinese: High Templar\\n\\n###\\n\\n","completion":" 杨永信 \/ 闪电 \/ 电兵 END"}
81
+ {"prompt":"help me translate this to Chinese: Sentry\\n\\n###\\n\\n","completion":" 烧饼 \/ 哨兵 END"}
82
+ {"prompt":"help me translate this to Chinese: Stalker\\n\\n###\\n\\n","completion":" 鸡猎 \/ 追猎 END"}
83
+ {"prompt":"help me translate this to Chinese: Zealot\\n\\n###\\n\\n","completion":" 堂口兄弟 \/ 叉子 \/ 叉叉 END"}
84
+ {"prompt":"help me translate this to Chinese: Carrier\\n\\n###\\n\\n","completion":" 黄金舰队 END"}
85
+ {"prompt":"help me translate this to Chinese: Barracks\\n\\n###\\n\\n","completion":" BB END"}
86
+ {"prompt":"help me translate this to Chinese: Probe\\n\\n###\\n\\n","completion":" 探鸡 \/ 农民 \/ 探姬 END"}
87
+ {"prompt":"help me translate this to Chinese: Psionic storm\\n\\n###\\n\\n","completion":" 闪电 END"}
88
+ {"prompt":"help me translate this to Chinese: Resonating glaives\\n\\n###\\n\\n","completion":" 使徒攻速 END"}
89
+ {"prompt":"help me translate this to Chinese: Blink\\n\\n###\\n\\n","completion":" blink END"}
90
+ {"prompt":"help me translate this to Chinese: Charge\\n\\n###\\n\\n","completion":" 脚速 END"}
91
+ {"prompt":"help me translate this to Chinese: Ground armor\\n\\n###\\n\\n","completion":" 神族防 END"}
92
+ {"prompt":"help me translate this to Chinese: Ground weapons\\n\\n###\\n\\n","completion":" 神族攻 END"}
93
+ {"prompt":"help me translate this to Chinese: Air weapons\\n\\n###\\n\\n","completion":" 空中单位武器等级 END"}
94
+ {"prompt":"help me translate this to Chinese: Air armor\\n\\n###\\n\\n","completion":" 空中单位护甲等级 END"}
95
+ {"prompt":"help me translate this to Chinese: Dragoon\\n\\n###\\n\\n","completion":" 龙骑士 END"}
96
+ {"prompt":"help me translate this to Chinese: Oracle\\n\\n###\\n\\n","completion":" 先知 END"}
97
+ {"prompt":"help me translate this to Chinese: Phoenix\\n\\n###\\n\\n","completion":" 凤凰 END"}
98
+ {"prompt":"help me translate this to Chinese: Colossus\\n\\n###\\n\\n","completion":" 巨像 END"}
99
+ {"prompt":"help me translate this to Chinese: Adept\\n\\n###\\n\\n","completion":" 使徒 END"}
100
+ {"prompt":"help me translate this to Chinese: Reactor\\n\\n###\\n\\n","completion":" 双倍挂件 END"}
101
+ {"prompt":"help me translate this to Chinese: Armory\\n\\n###\\n\\n","completion":" VA END"}
102
+ {"prompt":"help me translate this to Chinese: Sensor Tower\\n\\n###\\n\\n","completion":" 圈 END"}
103
+ {"prompt":"help me translate this to Chinese: Medivac Dropship\\n\\n###\\n\\n","completion":" 妹子 \/ 运输机 \/ 医疗 END"}
104
+ {"prompt":"help me translate this to Chinese: Banshee\\n\\n###\\n\\n","completion":" 女妖 END"}
105
+ {"prompt":"help me translate this to Chinese: Widow Mine\\n\\n###\\n\\n","completion":" 地雷 \/ 雷 END"}
106
+ {"prompt":"help me translate this to Chinese: Ghost\\n\\n###\\n\\n","completion":" 鬼子 \/ 鬼兵 END"}
107
+ {"prompt":"help me translate this to Chinese: Marauder\\n\\n###\\n\\n","completion":" 光头 END"}
108
+ {"prompt":"help me translate this to Chinese: Tech Lab\\n\\n###\\n\\n","completion":" 科技挂件 END"}
109
+ {"prompt":"help me translate this to Chinese: Ghost Academy\\n\\n###\\n\\n","completion":" VG END"}
110
+ {"prompt":"help me translate this to Chinese: Bunker\\n\\n###\\n\\n","completion":" 地堡 END"}
111
+ {"prompt":"help me translate this to Chinese: Engineering Bay\\n\\n###\\n\\n","completion":" BE END"}
112
+ {"prompt":"help me translate this to Chinese: Viking\\n\\n###\\n\\n","completion":" 味精 \/ 维京 END"}
113
+ {"prompt":"help me translate this to Chinese: Siege Tank\\n\\n###\\n\\n","completion":" 坦克 END"}
114
+ {"prompt":"help me translate this to Chinese: Hellbat\\n\\n###\\n\\n","completion":" 你爹侠 \/ 火车侠 END"}
115
+ {"prompt":"help me translate this to Chinese: Hellion\\n\\n###\\n\\n","completion":" 火车 END"}
116
+ {"prompt":"help me translate this to Chinese: Marine\\n\\n###\\n\\n","completion":" (50块)好兄弟 \/ 枪兵 \/ 机枪 END"}
117
+ {"prompt":"help me translate this to Chinese: Cloaking field\\n\\n###\\n\\n","completion":" 隐形 END"}
118
+ {"prompt":"help me translate this to Chinese: Supply Depot\\n\\n###\\n\\n","completion":" 房子 END"}
119
+ {"prompt":"help me translate this to Chinese: Robotics Bay\\n\\n###\\n\\n","completion":" VB END"}
120
+ {"prompt":"help me translate this to Chinese: Cybernetics Core\\n\\n###\\n\\n","completion":" BY END"}
121
+ {"prompt":"help me translate this to Chinese: Vehicle and ship plating\\n\\n###\\n\\n","completion":" 战车及舰船钢板等级 END"}
122
+ {"prompt":"help me translate this to Chinese: Vehicle weapons\\n\\n###\\n\\n","completion":" 战车武器等级 END"}
123
+ {"prompt":"help me translate this to Chinese: Hi-Sec auto tracking\\n\\n###\\n\\n","completion":" 建筑射程 END"}
124
+ {"prompt":"help me translate this to Chinese: Advanced ballistics\\n\\n###\\n\\n","completion":" 解放射程 END"}
125
+ {"prompt":"help me translate this to Chinese: Ignite afterburners\\n\\n###\\n\\n","completion":" 医疗机速度 END"}
126
+ {"prompt":"help me translate this to Chinese: Hyperflight rotors\\n\\n###\\n\\n","completion":" 女妖提速 END"}
127
+ {"prompt":"help me translate this to Chinese: Corvid reactor\\n\\n###\\n\\n","completion":" 铁鸦能量 END"}
128
+ {"prompt":"help me translate this to Chinese: Infernal pre-igniter\\n\\n###\\n\\n","completion":" 蓝火 END"}
129
+ {"prompt":"help me translate this to Chinese: Arm silo with nuke\\n\\n###\\n\\n","completion":" 核弹 END"}
130
+ {"prompt":"help me translate this to Chinese: Concussive shells\\n\\n###\\n\\n","completion":" 震荡弹、减速 END"}
131
+ {"prompt":"help me translate this to Chinese: Stimpack\\n\\n###\\n\\n","completion":" 兴奋剂、针 END"}
132
+ {"prompt":"help me translate this to Chinese: Orbital command\\n\\n###\\n\\n","completion":" 星轨 END"}
133
+ {"prompt":"help me translate this to Chinese: Missile Turret\\n\\n###\\n\\n","completion":" 防空 END"}
134
+ {"prompt":"help me translate this to Chinese: Drilling claws\\n\\n###\\n\\n","completion":" 速埋 END"}
135
+ {"prompt":"help me translate this to Chinese: Personal cloaking\\n\\n###\\n\\n","completion":" 隐形 END"}
136
+ {"prompt":"help me translate this to Chinese: Combat shield\\n\\n###\\n\\n","completion":" 盾 END"}
137
+ {"prompt":"help me translate this to Chinese: War Hound\\n\\n###\\n\\n","completion":" 战狼 END"}
138
+ {"prompt":"help me translate this to Chinese: Raven\\n\\n###\\n\\n","completion":" 渡鸦 END"}
139
+ {"prompt":"help me translate this to Chinese: Mule\\n\\n###\\n\\n","completion":" 矿螺 END"}
140
+ {"prompt":"help me translate this to Chinese: Reaper\\n\\n###\\n\\n","completion":" 死神 END"}
141
+ {"prompt":"help me translate this to Chinese: Thor\\n\\n###\\n\\n","completion":" 雷神 END"}
142
+ {"prompt":"help me translate this to Chinese: Nydus Worm\\n\\n###\\n\\n","completion":" 虫洞 \/ 嗷嗷嗷 END"}
143
+ {"prompt":"help me translate this to Chinese: Extractor\\n\\n###\\n\\n","completion":" 气矿(虫族) END"}
144
+ {"prompt":"help me translate this to Chinese: Hatchery\\n\\n###\\n\\n","completion":" 基地(虫族) END"}
145
+ {"prompt":"help me translate this to Chinese: Spore Crawler\\n\\n###\\n\\n","completion":" 防空 END"}
146
+ {"prompt":"help me translate this to Chinese: Nydus Network\\n\\n###\\n\\n","completion":" 虫洞 END"}
147
+ {"prompt":"help me translate this to Chinese: Lair\\n\\n###\\n\\n","completion":" 二本 END"}
148
+ {"prompt":"help me translate this to Chinese: Baneling Nest\\n\\n###\\n\\n","completion":" 毒爆塔 END"}
149
+ {"prompt":"help me translate this to Chinese: Spine Crawler\\n\\n###\\n\\n","completion":" 管子 END"}
150
+ {"prompt":"help me translate this to Chinese: Brood Lord\\n\\n###\\n\\n","completion":" 大龙 END"}
151
+ {"prompt":"help me translate this to Chinese: Overlord\\n\\n###\\n\\n","completion":" 气球 \/ 房子 END"}
152
+ {"prompt":"help me translate this to Chinese: Locust\\n\\n###\\n\\n","completion":" 小虫子 END"}
153
+ {"prompt":"help me translate this to Chinese: Swarm Host\\n\\n###\\n\\n","completion":" 宿主 END"}
154
+ {"prompt":"help me translate this to Chinese: Infestor\\n\\n###\\n\\n","completion":" 橄榄(虫) \/ 感染(虫) END"}
155
+ {"prompt":"help me translate this to Chinese: Changeling\\n\\n###\\n\\n","completion":" 二五仔 END"}
156
+ {"prompt":"help me translate this to Chinese: Broodling\\n\\n###\\n\\n","completion":" 小虫子 END"}
157
+ {"prompt":"help me translate this to Chinese: Baneling\\n\\n###\\n\\n","completion":" 黄旭东 \/ 毒爆 END"}
158
+ {"prompt":"help me translate this to Chinese: Zergling\\n\\n###\\n\\n","completion":" (小)狗 END"}
159
+ {"prompt":"help me translate this to Chinese: Queen\\n\\n###\\n\\n","completion":" 武则天 \/ 女王 END"}
160
+ {"prompt":"help me translate this to Chinese: Cocoon\\n\\n###\\n\\n","completion":" 卵 END"}
161
+ {"prompt":"help me translate this to Chinese: Larva\\n\\n###\\n\\n","completion":" 卵 END"}
162
+ {"prompt":"help me translate this to Chinese: Overseer\\n\\n###\\n\\n","completion":" 眼虫 END"}
163
+ {"prompt":"help me translate this to Chinese: Dark Templar\\n\\n###\\n\\n","completion":" 非洲人 \/ 隐刀 END"}
164
+ {"prompt":"help me translate this to Chinese: Factory\\n\\n###\\n\\n","completion":" VF(人族) END"}
165
+ {"prompt":"help me translate this to Chinese: Starport\\n\\n###\\n\\n","completion":" VS(人族) END"}
166
+ {"prompt":"help me translate this to Chinese: Refinery\\n\\n###\\n\\n","completion":" 气矿(人族) END"}
167
+ {"prompt":"help me translate this to Chinese: Command Center\\n\\n###\\n\\n","completion":" 基地(人族) END"}
168
+ {"prompt":"help me translate this to Chinese: Warp Prism\\n\\n###\\n\\n","completion":" 50人口 \/ 棱镜 END"}
169
+ {"prompt":"help me translate this to Chinese: Cyclone\\n\\n###\\n\\n","completion":" 导弹车 \/ 土方车 \/ 捣蛋车 \/ 人族快乐车 END"}
170
+ {"prompt":"help me translate this to Chinese: Battle Cruiser\\n\\n###\\n\\n","completion":" 人族快乐船 \/ 大和 END"}
171
+ {"prompt":"help me translate this to Chinese: SCV\\n\\n###\\n\\n","completion":" 人族最强近战 \/ 金刚毒龙钻 \/ 农民 END"}
172
+ {"prompt":"help me translate this to Chinese: Infantry armor\\n\\n###\\n\\n","completion":" 人族防 END"}
173
+ {"prompt":"help me translate this to Chinese: Infantry weapons\\n\\n###\\n\\n","completion":" 人族攻 END"}
pipeline.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ from pytube import YouTube
3
+ import argparse
4
+ import os
5
+ import io
6
+
7
+ parser = argparse.ArgumentParser()
8
+ parser.add_argument("--link", help="youtube video link here", default=None, type=str, required=False)
9
+ parser.add_argument("--local_path", help="local video path here", default=None, type=str, required=False)
10
+ parser.add_argument("--download", help="download path", default='./downloads', type=str, required=False)
11
+ parser.add_argument("--result", help="translate result path", default='./results', type=str, required=False)
12
+ parser.add_argument("--video_name", help="video name", default='placeholder', type=str, required=False)
13
+ args = parser.parse_args()
14
+
15
+ 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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" for testing, plz not publish it.
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 = "pigeon-ai-2023-03-14-06-28-11"
27
+
28
+ # get source audio
29
+ if args.link is not None:
30
+ # Download audio from YouTube
31
+ video_link = args.link
32
+ try:
33
+ video = YouTube(video_link)
34
+ audio = video.streams.filter(only_audio=True, file_extension='mp4').first()
35
+ audio.download(DOWNLOAD_PATH)
36
+ print('Download Completed!')
37
+ except:
38
+ print("Connection Error")
39
+ audio_file = open('{}/{}'.format(DOWNLOAD_PATH, audio.default_filename), "rb")
40
+ VIDEO_NAME = audio.default_filename.split('.')[0]
41
+ else:
42
+ # Read from local
43
+ audio_file= open(args.local_path, "rb")
44
+
45
+ # perform speech-to-text and save it in <video name>_en.txt under RESULT PATH.
46
+ if not os.path.exists("{}/{}_en.txt".format(RESULT_PATH, VIDEO_NAME)):
47
+ transcript = openai.Audio.transcribe("whisper-1", audio_file)
48
+ with open("{}/{}_en.txt".format(RESULT_PATH, VIDEO_NAME), 'w') as f:
49
+ f.write(transcript['text'])
50
+
51
+ # split the video script(open ai prompt limit: about 5000)
52
+ with open("{}/{}_en.txt".format(RESULT_PATH, VIDEO_NAME), 'r') as f:
53
+ script_en = f.read()
54
+ N = len(script_en)
55
+ script_split = script_en.split('.')
56
+
57
+ script_arr = []
58
+ script = ""
59
+ for sentence in script_split:
60
+ if len(script) <= n_threshold:
61
+ n = len(sentence)
62
+ script+=sentence
63
+ else:
64
+ script_arr.append(script)
65
+ script = ""
66
+ script_arr.append(script)
67
+
68
+ # translate and save
69
+ for s in script_arr:
70
+ response = openai.Completion.create(
71
+ model=model_name,
72
+ prompt="Please healp me translate this into Chinese:\n\n{}\n\n".format(s),
73
+ temperature=0.1,
74
+ max_tokens=2000,
75
+ top_p=1.0,
76
+ frequency_penalty=0.0,
77
+ presence_penalty=0.0
78
+ )
79
+
80
+ with open("{}/{}_zh.txt".format(RESULT_PATH, VIDEO_NAME), 'a+') as f:
81
+ f.write(response['choices'][0]['text'])
test_translation.m4a ADDED
Binary file (333 kB). View file
 
test_translation.mp4.REMOVED.git-id ADDED
@@ -0,0 +1 @@
 
 
1
+ e0f20010929eda7a49216960e17c201cb9778750