Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def getHeadlines():
|
|
26 |
return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
|
27 |
|
28 |
|
29 |
-
def predict(text,
|
30 |
if len(text.strip()) == 0:
|
31 |
return (16000, np.zeros(0).astype(np.int16))
|
32 |
|
@@ -80,14 +80,6 @@ gr.Interface(
|
|
80 |
fn=predict,
|
81 |
inputs=[
|
82 |
gr.Text(label="Input Text"),
|
83 |
-
gr.Radio(label="Speaker", choices=[
|
84 |
-
"BDL (male)",
|
85 |
-
"CLB (female)",
|
86 |
-
"KSP (male)",
|
87 |
-
"RMS (male)",
|
88 |
-
"SLT (female)",
|
89 |
-
"Surprise Me!"
|
90 |
-
], value="BDL (male)"),
|
91 |
gr.Radio(label="Preset", choices=[
|
92 |
"US",
|
93 |
"International",
|
|
|
26 |
return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
|
27 |
|
28 |
|
29 |
+
def predict(text, preset):
|
30 |
if len(text.strip()) == 0:
|
31 |
return (16000, np.zeros(0).astype(np.int16))
|
32 |
|
|
|
80 |
fn=predict,
|
81 |
inputs=[
|
82 |
gr.Text(label="Input Text"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
gr.Radio(label="Preset", choices=[
|
84 |
"US",
|
85 |
"International",
|