Spaces:
Edmond98
/
Running on A100

vineelpratap commited on
Commit
ca2c701
1 Parent(s): 96ba7be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -8,11 +8,10 @@ from lid import identify, LID_EXAMPLES
8
  demo = gr.Blocks()
9
 
10
 
11
- mms_source_trans = gr.Audio()
12
  mms_transcribe = gr.Interface(
13
  fn=transcribe,
14
  inputs=[
15
- mms_source_trans,
16
  gr.Dropdown(
17
  [f"{k} ({v})" for k, v in ASR_LANGUAGES.items()],
18
  label="Language",
@@ -51,11 +50,10 @@ mms_synthesize = gr.Interface(
51
  allow_flagging="never",
52
  )
53
 
54
- mms_source_iden = gr.Audio()
55
  mms_identify = gr.Interface(
56
  fn=identify,
57
  inputs=[
58
- mms_source_iden,
59
  ],
60
  outputs=gr.Label(num_top_classes=10),
61
  examples=LID_EXAMPLES,
@@ -64,14 +62,9 @@ mms_identify = gr.Interface(
64
  allow_flagging="never",
65
  )
66
 
67
- # tabbed_interface = gr.TabbedInterface(
68
- # [mms_transcribe, mms_synthesize, mms_identify],
69
- # ["Speech-to-text", "Text-to-speech", "Language Identification"],
70
- # )
71
-
72
  tabbed_interface = gr.TabbedInterface(
73
- [ mms_synthesize],
74
- ["Text-to-speech"],
75
  )
76
 
77
  with gr.Blocks() as demo:
@@ -99,5 +92,5 @@ with gr.Blocks() as demo:
99
  """
100
  )
101
 
102
- demo.queue(concurrency_count=3)
103
- demo.launch()
 
8
  demo = gr.Blocks()
9
 
10
 
 
11
  mms_transcribe = gr.Interface(
12
  fn=transcribe,
13
  inputs=[
14
+ gr.Audio(),
15
  gr.Dropdown(
16
  [f"{k} ({v})" for k, v in ASR_LANGUAGES.items()],
17
  label="Language",
 
50
  allow_flagging="never",
51
  )
52
 
 
53
  mms_identify = gr.Interface(
54
  fn=identify,
55
  inputs=[
56
+ gr.Audio(),
57
  ],
58
  outputs=gr.Label(num_top_classes=10),
59
  examples=LID_EXAMPLES,
 
62
  allow_flagging="never",
63
  )
64
 
 
 
 
 
 
65
  tabbed_interface = gr.TabbedInterface(
66
+ [mms_transcribe, mms_synthesize, mms_identify],
67
+ ["Speech-to-text", "Text-to-speech", "Language Identification"],
68
  )
69
 
70
  with gr.Blocks() as demo:
 
92
  """
93
  )
94
 
95
+ demo.queue(default_concurrency_limit=3)
96
+ demo.launch()