msis commited on
Commit
dbc0884
1 Parent(s): 29a3b44

updates app.py

Browse files

- support 30 queues
- bind to 0.0.0.0

Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -5,6 +5,9 @@ import torch
5
  import nemo.collections.asr as nemo_asr
6
  import wandb
7
  from pydub.utils import mediainfo
 
 
 
8
 
9
 
10
  MODEL_HISTORY_DAYS = 180
@@ -52,9 +55,7 @@ def get_duration_ms(audio_file):
52
  return duration_ms
53
 
54
 
55
- demo = gr.Blocks()
56
-
57
- with demo:
58
  gr.Markdown(
59
  """
60
  # ﷽
@@ -87,4 +88,5 @@ with demo:
87
  api_name="get_duration_ms",
88
  )
89
 
90
- demo.launch()
 
 
5
  import nemo.collections.asr as nemo_asr
6
  import wandb
7
  from pydub.utils import mediainfo
8
+ from dotenv import load_dotenv
9
+
10
+ load_dotenv()
11
 
12
 
13
  MODEL_HISTORY_DAYS = 180
 
55
  return duration_ms
56
 
57
 
58
+ with gr.Blocks() as demo:
 
 
59
  gr.Markdown(
60
  """
61
  # ﷽
 
88
  api_name="get_duration_ms",
89
  )
90
 
91
+ demo.queue(concurrency_count=30)
92
+ demo.launch(server_name="0.0.0.0")