operablepattern commited on
Commit
0c59d93
1 Parent(s): 2d3ef06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -14,16 +14,13 @@ pipe = pipeline(
14
  device=device,
15
  )
16
 
17
- def transcribe(inputs, task):
18
  if inputs is None:
19
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
20
 
21
  text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
22
  return text
23
 
24
- def greet(name):
25
- return "Hello " + name + "!!"
26
-
27
  iface = gr.Interface(
28
  fn=transcribe,
29
  inputs=[
@@ -31,7 +28,6 @@ iface = gr.Interface(
31
  ],
32
  outputs="text",
33
  layout="horizontal",
34
- theme="huggingface",
35
  title="test",
36
  description=(
37
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
 
14
  device=device,
15
  )
16
 
17
+ def transcribe(inputs, task = "transcribe"):
18
  if inputs is None:
19
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
20
 
21
  text = pipe(inputs, batch_size=BATCH_SIZE, generate_kwargs={"task": task}, return_timestamps=True)["text"]
22
  return text
23
 
 
 
 
24
  iface = gr.Interface(
25
  fn=transcribe,
26
  inputs=[
 
28
  ],
29
  outputs="text",
30
  layout="horizontal",
 
31
  title="test",
32
  description=(
33
  "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"