Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -1,17 +1,9 @@
|
|
1 |
-
from
|
2 |
-
import scipy
|
3 |
|
4 |
-
|
5 |
-
model = AutoModel.from_pretrained("suno/bark-small")
|
6 |
|
7 |
-
inputs = processor(
|
8 |
-
text=["Hello, my name is Suno. And, uh — and I like pizza. [laughs] But I also have other interests such as playing tic tac toe."],
|
9 |
-
return_tensors="pt",
|
10 |
-
)
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
sampling_rate = model.config.sample_rate
|
16 |
-
scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())
|
17 |
|
|
|
1 |
+
from fastapi import FastAPI
|
|
|
2 |
|
3 |
+
app = FastAPI()
|
|
|
4 |
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
@app.get("/")
|
7 |
+
async def root():
|
8 |
+
return {"message": "Hello World"}
|
|
|
|
|
9 |
|