Spaces:
Paused
Paused
Commit
·
09459a8
1
Parent(s):
d899511
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ import stat
|
|
| 11 |
import uuid
|
| 12 |
import subprocess
|
| 13 |
|
|
|
|
| 14 |
ZipFile("ffmpeg.zip").extractall()
|
| 15 |
st = os.stat('ffmpeg')
|
| 16 |
os.chmod('ffmpeg', st.st_mode | stat.S_IEXEC)
|
|
@@ -18,10 +19,12 @@ os.chmod('ffmpeg', st.st_mode | stat.S_IEXEC)
|
|
| 18 |
with open('language_codes.json', 'r') as f:
|
| 19 |
lang_codes = json.load(f)
|
| 20 |
|
|
|
|
| 21 |
tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
|
| 22 |
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M")
|
| 23 |
whisper_model = WhisperModel("large-v2", device="cuda", compute_type="float16")
|
| 24 |
|
|
|
|
| 25 |
def process_video(Video, target_language):
|
| 26 |
print("Iniciando process_video")
|
| 27 |
common_uuid = uuid.uuid4()
|
|
|
|
| 11 |
import uuid
|
| 12 |
import subprocess
|
| 13 |
|
| 14 |
+
print(os.getcwd())
|
| 15 |
ZipFile("ffmpeg.zip").extractall()
|
| 16 |
st = os.stat('ffmpeg')
|
| 17 |
os.chmod('ffmpeg', st.st_mode | stat.S_IEXEC)
|
|
|
|
| 19 |
with open('language_codes.json', 'r') as f:
|
| 20 |
lang_codes = json.load(f)
|
| 21 |
|
| 22 |
+
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
|
| 24 |
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M")
|
| 25 |
whisper_model = WhisperModel("large-v2", device="cuda", compute_type="float16")
|
| 26 |
|
| 27 |
+
|
| 28 |
def process_video(Video, target_language):
|
| 29 |
print("Iniciando process_video")
|
| 30 |
common_uuid = uuid.uuid4()
|