ibrahim313 commited on
Commit
562fd62
1 Parent(s): ea57806

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,17 +1,15 @@
1
  import streamlit as st
2
  import torch
3
- from transformers import pipeline, AutoModelForSeq2SeqLM, AutoTokenizer
 
4
  import soundfile as sf
5
 
6
  # Set up the device
7
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
8
 
9
- # Use pipeline as a high-level helper
10
- pipe = pipeline("text-to-speech", model="ipsilondev/parler_tts")
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("""