Spaces:
Runtime error
Runtime error
init
Browse files- app.py +2 -18
- front/.bolt/config.json +0 -3
- front/.bolt/prompt +0 -8
- requirements.txt +2 -1
app.py
CHANGED
@@ -6,27 +6,11 @@ import os
|
|
6 |
from huggingface_hub import InferenceClient, login
|
7 |
import logging
|
8 |
|
9 |
-
# Configurer les logs de debug
|
10 |
-
logging.basicConfig(level=logging.
|
11 |
|
12 |
app = Flask(__name__)
|
13 |
|
14 |
-
# Définir et créer le dossier de cache pour Hugging Face
|
15 |
-
HUGGINGFACE_CACHE_DIR = "./huggingface_cache"
|
16 |
-
os.makedirs(HUGGINGFACE_CACHE_DIR, exist_ok=True)
|
17 |
-
logging.debug("Dossier de cache Hugging Face : %s", HUGGINGFACE_CACHE_DIR)
|
18 |
-
|
19 |
-
# Charger le processor et le modèle en utilisant le cache
|
20 |
-
logging.debug("Début du chargement du processor et du modèle...")
|
21 |
-
processor = AutoProcessor.from_pretrained(
|
22 |
-
"facebook/seamless-m4t-v2-large", cache_dir=HUGGINGFACE_CACHE_DIR
|
23 |
-
)
|
24 |
-
logging.debug("Processor chargé avec succès et mis en cache : %s", processor)
|
25 |
-
model = SeamlessM4Tv2Model.from_pretrained(
|
26 |
-
"facebook/seamless-m4t-v2-large", cache_dir=HUGGINGFACE_CACHE_DIR
|
27 |
-
)
|
28 |
-
logging.debug("Modèle chargé avec succès et mis en cache : %s", model)
|
29 |
-
|
30 |
|
31 |
UPLOAD_FOLDER = "audio_files"
|
32 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
|
|
6 |
from huggingface_hub import InferenceClient, login
|
7 |
import logging
|
8 |
|
9 |
+
# Configurer les logs de debug
|
10 |
+
logging.basicConfig(level=logging.INFO)
|
11 |
|
12 |
app = Flask(__name__)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
UPLOAD_FOLDER = "audio_files"
|
16 |
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
|
front/.bolt/config.json
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"template": "bolt-vite-react-ts"
|
3 |
-
}
|
|
|
|
|
|
|
|
front/.bolt/prompt
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
For all designs I ask you to make, have them be beautiful, not cookie cutter. Make webpages that are fully featured and worthy for production.
|
2 |
-
|
3 |
-
By default, this template supports JSX syntax with Tailwind CSS classes, React hooks, and Lucide React for icons. Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them.
|
4 |
-
|
5 |
-
Use icons from lucide-react for logos.
|
6 |
-
|
7 |
-
Use stock photos from unsplash where appropriate, only valid URLs you know exist. Do not download the images, only link to them in image tags.
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -6,4 +6,5 @@ dotenv
|
|
6 |
huggingface-hub
|
7 |
tiktoken
|
8 |
blobfile
|
9 |
-
protobuf
|
|
|
|
6 |
huggingface-hub
|
7 |
tiktoken
|
8 |
blobfile
|
9 |
+
protobuf
|
10 |
+
sentencepiece
|