Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from gradio.inputs import Textbox
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
|
| 5 |
from datasets import load_dataset
|
| 6 |
import torch
|
| 7 |
import random
|
| 8 |
import string
|
| 9 |
import soundfile as sf
|
| 10 |
-
import nltk
|
| 11 |
-
from nltk.tokenize import word_tokenize
|
| 12 |
|
| 13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 14 |
# load the processor
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from gradio.inputs import Textbox
|
| 3 |
|
| 4 |
+
import nltk
|
| 5 |
+
nltk.download('punkt')
|
| 6 |
+
from nltk.tokenize import word_tokenize
|
| 7 |
+
|
| 8 |
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
|
| 9 |
from datasets import load_dataset
|
| 10 |
import torch
|
| 11 |
import random
|
| 12 |
import string
|
| 13 |
import soundfile as sf
|
|
|
|
|
|
|
| 14 |
|
| 15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 16 |
# load the processor
|