Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -7,7 +7,6 @@ import numpy as np
|
|
7 |
import librosa
|
8 |
from scipy.io import wavfile
|
9 |
import asyncio
|
10 |
-
from voice_processing import tts, get_model_names, voice_mapping, get_unique_filename
|
11 |
|
12 |
class EndpointHandler:
|
13 |
def __init__(self, model_dir=None):
|
@@ -23,6 +22,9 @@ class EndpointHandler:
|
|
23 |
repo_dir = "TTS_Mongolian"
|
24 |
os.chdir(repo_dir)
|
25 |
|
|
|
|
|
|
|
26 |
if "inputs" in data:
|
27 |
# Check if data is in Hugging Face JSON format
|
28 |
return self.process_hf_input(data)
|
|
|
7 |
import librosa
|
8 |
from scipy.io import wavfile
|
9 |
import asyncio
|
|
|
10 |
|
11 |
class EndpointHandler:
|
12 |
def __init__(self, model_dir=None):
|
|
|
22 |
repo_dir = "TTS_Mongolian"
|
23 |
os.chdir(repo_dir)
|
24 |
|
25 |
+
# Import the voice_processing module and functions
|
26 |
+
from voice_processing import tts, get_model_names, voice_mapping, get_unique_filename
|
27 |
+
|
28 |
if "inputs" in data:
|
29 |
# Check if data is in Hugging Face JSON format
|
30 |
return self.process_hf_input(data)
|