Spaces:
Running
Running
File size: 641 Bytes
0e1ed60 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from transformers import pipeline, AutoModelForSpeechSeq2Seq, AutoProcessor
import os
# Hugging‑Face‑Token als Umgebungsvariable (sieh oben)
HF_TOKEN = os.getenv("HF_TOKEN")
# Modell und Prozessor laden
model = AutoModelForSpeechSeq2Seq.from_pretrained("SebastianBodza/Kartoffelbox-v0.1", use_auth_token=HF_TOKEN)
processor = AutoProcessor.from_pretrained("SebastianBodza/Kartoffelbox-v0.1", use_auth_token=HF_TOKEN)
# Wenn das Modell Speaker‑Listen in der Config speichert:
speakers = getattr(model.config, "speakers", None) or getattr(processor, "speaker_ids_to_tokens", None)
print("Verfügbare Speaker‑IDs:")
print(speakers)
|