Skip to content

Commit

Permalink
Merge pull request #220 from teamViNO/feature/video
Browse files Browse the repository at this point in the history
[fix] 스왑메모리 설정
  • Loading branch information
jainefer authored Feb 20, 2024
2 parents 1d69bf2 + 10e7713 commit 7925327
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .ebextensions/01_steup_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commands:
01setup_swap:
test: test ! -e /var/swapfile
command: |
/bin/dd if=/dev/zero of=/var/swapfile bs=128M count=16
/bin/chmod 600 /var/swapfile
/sbin/mkswap /var/swapfile
/sbin/swapon /var/swapfile
2 changes: 1 addition & 1 deletion src/services/chatGPT.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const chatGPTCall = async (scriptText) => {
// ChatGPT에 전달할 프롬프트를 구성합니다.
const system_prompt =
`Step 1. Look at the example Json given with the original script and give it to me in json. "subheading" is to break up the paragraphs of the given script according to the subtopics. The name of subheading is the title of the subtopic, and subheading.content should keep the original script divided according to the subtopic. subheading.name and subheading.content should be different. Add the contents in subheading together and we need to divide them so that the original script comes out. This subheading should be able to be at least 1 to highest 10 and contain all of the divided scripts. "tag" is the keyword for the overall scripts. Please indicate at least 2 to 5. The result should be in Korean. You need to have the above conditions and give them to the Json example below
{"subheading": [{"name": "Subtitle 1","start_time": "script1 start time,""end_time": "script 1 end time","content": "script 1"},{"name": "Subtitle 2","start_time": "script2 start time","end_time": "script 2 end time","content": "script 2"}],"tag": [{"name": "Tag 1"},{"name": "Tag 2"},{"name": "Tag 3"}]}
{"subheading": [{"name": "Subtitle 1","content": "script 1"},{"name": "Subtitle 2","content": "script 2"}],"tag": [{"name": "Tag 1"},{"name": "Tag 2"},{"name": "Tag 3"}]}
`;

const prompt = `Run this script from step 1 , Make sure to fulfill the condition given to the system promport. original script: ${scriptText}\n ` ;
Expand Down
1 change: 0 additions & 1 deletion src/services/translateToMP3.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const desktopPath = path.join(__dirname, '..', '..');
// tempMP3 폴더 경로
const outputPath = '/tmp';


export const convertVideoToAudio = async (videoId) => {
return new Promise((resolve, reject) => {
const stream = ytdl(`http://www.youtube.com/watch?v=${videoId}`, { filter: 'audioonly' });
Expand Down

0 comments on commit 7925327

Please sign in to comment.