Spaces:
Build error
Build error
ibrahim313
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,15 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
-
from
|
|
|
4 |
import soundfile as sf
|
5 |
|
6 |
# Set up the device
|
7 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
-
#
|
10 |
-
|
11 |
-
|
12 |
-
# Load model directly
|
13 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("ipsilondev/parler_tts").to(device)
|
14 |
-
tokenizer = AutoTokenizer.from_pretrained("ipsilondev/parler_tts")
|
15 |
|
16 |
# Neon-themed styling
|
17 |
st.markdown("""
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
+
from parler_tts import ParlerTTSForConditionalGeneration
|
4 |
+
from transformers import AutoTokenizer
|
5 |
import soundfile as sf
|
6 |
|
7 |
# Set up the device
|
8 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
9 |
|
10 |
+
# Load the model and tokenizer
|
11 |
+
model = ParlerTTSForConditionalGeneration.from_pretrained("parler-tts/parler-tts-large-v1").to(device)
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-tts-large-v1")
|
|
|
|
|
|
|
13 |
|
14 |
# Neon-themed styling
|
15 |
st.markdown("""
|