Commit
·
b1adfd6
1
Parent(s):
c3fdd00
fix temp_audiofile permission issue
Browse files- main.py +0 -2
- utils/subtitler.py +1 -1
- utils/transcriber.py +0 -1
main.py
CHANGED
@@ -10,8 +10,6 @@ from fastapi.responses import HTMLResponse, Response
|
|
10 |
from fastapi.security import HTTPBasic
|
11 |
from pydantic import BaseModel, field_validator
|
12 |
|
13 |
-
# TODO: fix .env issue
|
14 |
-
|
15 |
app = FastAPI()
|
16 |
security = HTTPBasic()
|
17 |
|
|
|
10 |
from fastapi.security import HTTPBasic
|
11 |
from pydantic import BaseModel, field_validator
|
12 |
|
|
|
|
|
13 |
app = FastAPI()
|
14 |
security = HTTPBasic()
|
15 |
|
utils/subtitler.py
CHANGED
@@ -56,4 +56,4 @@ def subtitler(video_file:str,
|
|
56 |
text_position = (subtitle_x_position, subtitle_y_position)
|
57 |
subtitle_clips.append(txt_clip.set_position(text_position))
|
58 |
video = CompositeVideoClip(size=None, clips=[clip] + subtitle_clips)
|
59 |
-
video.write_videofile(output_file, codec='libx264', audio_codec='aac')
|
|
|
56 |
text_position = (subtitle_x_position, subtitle_y_position)
|
57 |
subtitle_clips.append(txt_clip.set_position(text_position))
|
58 |
video = CompositeVideoClip(size=None, clips=[clip] + subtitle_clips)
|
59 |
+
video.write_videofile(output_file, codec='libx264', audio_codec='aac', temp_audiofile = None)
|
utils/transcriber.py
CHANGED
@@ -7,7 +7,6 @@ def transcriber(invideo_file:str, srt_file:str,
|
|
7 |
load_dotenv()
|
8 |
HF_TOKEN = os.getenv("hf_token")
|
9 |
HF_SPACE = os.getenv("hf_space")
|
10 |
-
print(HF_SPACE)
|
11 |
client = Client(HF_SPACE, hf_token=HF_TOKEN)
|
12 |
result = client.predict(
|
13 |
video_input=handle_file(invideo_file),
|
|
|
7 |
load_dotenv()
|
8 |
HF_TOKEN = os.getenv("hf_token")
|
9 |
HF_SPACE = os.getenv("hf_space")
|
|
|
10 |
client = Client(HF_SPACE, hf_token=HF_TOKEN)
|
11 |
result = client.predict(
|
12 |
video_input=handle_file(invideo_file),
|