ysharma HF staff commited on
Commit
ca97dd1
1 Parent(s): d42f4c5

update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -1,7 +1,21 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ fastspeech = gr.Interface.load("huggingface/facebook/fastspeech2-en-ljspeech")
 
4
 
5
+ def text2speech(text):
6
+ return fastspeech(text)
7
+
8
+
9
+ app = gr.Interface(fn=text2speech,
10
+ inputs="text",
11
+ live=True,
12
+ description="Takes a snapshot of an object, identifies it, and then tell you what it is. \n Intended use is to help the visually impaired. Models and dataset used is listed on the linked models and dataset",
13
+ outputs="speech",
14
+ examples=["remotecontrol.jpg", "calculator.jpg", "cellphone.jpg"])
15
+
16
+
17
+ #def greet(name):
18
+ # return "Hello " + name + "!!"
19
+
20
+ #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
21
+ #iface.launch()