Spaces:
Runtime error
Runtime error
traduction
Browse files- app.py +9 -0
- requirements.txt +4 -1
app.py
CHANGED
@@ -4,6 +4,8 @@ import numpy as np
|
|
4 |
import wave
|
5 |
import os
|
6 |
from huggingface_hub import InferenceClient, login
|
|
|
|
|
7 |
app = Flask(__name__)
|
8 |
|
9 |
|
@@ -11,6 +13,13 @@ app = Flask(__name__)
|
|
11 |
processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large" )
|
12 |
model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large")
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
UPLOAD_FOLDER = "audio_files"
|
15 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
16 |
|
|
|
4 |
import wave
|
5 |
import os
|
6 |
from huggingface_hub import InferenceClient, login
|
7 |
+
import logging
|
8 |
+
|
9 |
app = Flask(__name__)
|
10 |
|
11 |
|
|
|
13 |
processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large" )
|
14 |
model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large")
|
15 |
|
16 |
+
# Charger le processor et le modèle avec affichage des logs
|
17 |
+
logging.debug("Début du chargement du processor et du modèle...")
|
18 |
+
processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large")
|
19 |
+
logging.debug("Processor chargé avec succès : %s", processor)
|
20 |
+
model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large")
|
21 |
+
logging.debug("Modèle chargé avec succès : %s", model)
|
22 |
+
|
23 |
UPLOAD_FOLDER = "audio_files"
|
24 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
25 |
|
requirements.txt
CHANGED
@@ -5,4 +5,7 @@ transformers
|
|
5 |
dotenv
|
6 |
huggingface-hub
|
7 |
tiktoken
|
8 |
-
blobfile
|
|
|
|
|
|
|
|
5 |
dotenv
|
6 |
huggingface-hub
|
7 |
tiktoken
|
8 |
+
blobfile
|
9 |
+
sentencepiece
|
10 |
+
google
|
11 |
+
protobuf
|