Gregniuki commited on
Commit
f3a2a3b
·
1 Parent(s): 8adced8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -7
app.py CHANGED
@@ -9,13 +9,14 @@ from typing import Iterable, List, Optional, Union
9
  import numpy as np
10
  import onnxruntime
11
 
12
- # Create an instance of the FastAPI class
13
- app = FastAPI()
 
 
 
 
 
14
 
15
- # Define a route for the root endpoint
16
- @app.get("/")
17
- def read_root():
18
- return {"message": "Hello, World!"}
19
  def detect_onnx_models(path):
20
  onnx_models = glob.glob(path + '/*.onnx')
21
  if len(onnx_models) > 1:
@@ -360,4 +361,12 @@ def transform(input_data):
360
  magnitude = np.sqrt(real_part**2 + imag_part**2)
361
  phase = np.arctan2(imag_part.data, real_part.data)
362
 
363
- return magnitude, phase
 
 
 
 
 
 
 
 
 
9
  import numpy as np
10
  import onnxruntime
11
 
12
+ import glob
13
+ import ipywidgets as widgets
14
+ from IPython.display import display, Audio, Markdown, clear_output
15
+ from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run
16
+
17
+ #_LOGGER = logging.getLogger("piper_train.infer_onnx")
18
+
19
 
 
 
 
 
20
  def detect_onnx_models(path):
21
  onnx_models = glob.glob(path + '/*.onnx')
22
  if len(onnx_models) > 1:
 
361
  magnitude = np.sqrt(real_part**2 + imag_part**2)
362
  phase = np.arctan2(imag_part.data, real_part.data)
363
 
364
+ return magnitude, phase
365
+
366
+ # Create an instance of the FastAPI class
367
+ app = main()
368
+
369
+ # Define a route for the root endpoint
370
+ @app.get("/")
371
+ def read_root():
372
+ return {"message": "Hello, World!"}