Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
β’
e0c2b71
1
Parent(s):
0899e82
Update app.py
Browse files
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=
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import torch
|
3 |
+
import whisper
|
4 |
+
|
5 |
+
### ββββββββββββββββββββββββββββββββββββββββ
|
6 |
+
|
7 |
+
title="Whisper to Emotion"
|
8 |
+
|
9 |
+
### ββββββββββββββββββββββββββββββββββββββββ
|
10 |
+
|
11 |
+
whisper_model = whisper.load_model("small")
|
12 |
+
|
13 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
14 |
+
|
15 |
+
record_input = gr.Audio(source="microphone",type="filepath", show_label=False)
|
16 |
|
17 |
def greet(name):
|
18 |
return "Hello " + name + "!!"
|
19 |
|
20 |
+
iface = gr.Interface(fn=greet, inputs=record_input, outputs="text")
|
21 |
iface.launch()
|