Core23 commited on
Commit
4b25836
1 Parent(s): 9b351d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -2,6 +2,25 @@ import os
2
  import openai
3
  import gradio as gr
4
  from transformers import pipeline
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  openai.api_key = os.getenv("OPENAI_API_KEY")
7
 
@@ -71,25 +90,6 @@ def download(lang, tgt_dir="./"):
71
  LANG = "swh"
72
  ckpt_dir = download(LANG)
73
 
74
- from IPython.display import Audio
75
- import os
76
- import re
77
- import glob
78
- import json
79
- import tempfile
80
- import math
81
- import torch
82
- from torch import nn
83
- from torch.nn import functional as F
84
- from torch.utils.data import DataLoader
85
- import numpy as np
86
- import commons
87
- import utils
88
- import argparse
89
- import subprocess
90
- from data_utils import TextAudioLoader, TextAudioCollate, TextAudioSpeakerLoader, TextAudioSpeakerCollate
91
- from models import SynthesizerTrn
92
- from scipy.io.wavfile import write
93
 
94
  def preprocess_char(text, lang=None):
95
  """
 
2
  import openai
3
  import gradio as gr
4
  from transformers import pipeline
5
+ from IPython.display import Audio
6
+ import os
7
+ import re
8
+ import glob
9
+ import json
10
+ import tempfile
11
+ import math
12
+ import torch
13
+ from torch import nn
14
+ from torch.nn import functional as F
15
+ from torch.utils.data import DataLoader
16
+ import numpy as np
17
+ import commons
18
+ import utils
19
+ import argparse
20
+ import subprocess
21
+ from data_utils import TextAudioLoader, TextAudioCollate, TextAudioSpeakerLoader, TextAudioSpeakerCollate
22
+ from models import SynthesizerTrn
23
+ from scipy.io.wavfile import write
24
 
25
  openai.api_key = os.getenv("OPENAI_API_KEY")
26
 
 
90
  LANG = "swh"
91
  ckpt_dir = download(LANG)
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
  def preprocess_char(text, lang=None):
95
  """