akhil2808 commited on
Commit
26b053d
·
verified ·
1 Parent(s): 74be4e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -12
app.py CHANGED
@@ -50,15 +50,11 @@ def recognition(audio, style=0):
50
  return txt
51
 
52
 
53
- # input
54
- inputs = [
55
- gr.inputs.Audio(source="microphone", type="filepath", label='Input audio'),
56
- gr.Slider(0, 1, value=0, label="Verbatimicity - from non-verbatim (0) to verbatim (1)", info="Choose a transcription style between non-verbatim and verbatim"),
57
- ]
58
-
59
-
60
- output = gr.outputs.Textbox(label="Output Text")
61
-
62
  text = "ASR Transcription Opensource Demo"
63
 
64
  # description
@@ -73,11 +69,11 @@ description = (
73
 
74
  interface = gr.Interface(
75
  fn=recognition,
76
- inputs=inputs,
77
- outputs=output,
78
  title=text,
79
  description=description,
80
- theme='huggingface',
81
  )
82
 
83
  interface.launch(enable_queue=True)
 
50
  return txt
51
 
52
 
53
+ audio_input = gr.Audio(type="filepath", label="Upload or Record Audio")
54
+ style_slider = gr.Slider(0, 1, value=0, step=0.1, label="Transcription Style",
55
+ info="Adjust the transcription style: 0 (casual) to 1 (formal).")
56
+ output_textbox = gr.Textbox(label="Transcription Output")
57
+
 
 
 
 
58
  text = "ASR Transcription Opensource Demo"
59
 
60
  # description
 
69
 
70
  interface = gr.Interface(
71
  fn=recognition,
72
+ inputs=[audio_input, style_slider],
73
+ outputs=output_textbox,
74
  title=text,
75
  description=description,
76
+ theme='default',
77
  )
78
 
79
  interface.launch(enable_queue=True)