rjorgec commited on
Commit
a3dcce3
·
unverified ·
1 Parent(s): 350a10c

Initialize metrics with environment variables

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -12,6 +12,11 @@ CHORDS = {
12
  frozenset(["F", "A", "C"]): "F Major",
13
  }
14
 
 
 
 
 
 
15
  def identify_chord(notes):
16
  """
17
  Identify chord name from a list of notes using dictionary lookup.
 
12
  frozenset(["F", "A", "C"]): "F Major",
13
  }
14
 
15
+ init_metrics(
16
+ port=int(os.getenv("METRICS_PORT", "8000")),
17
+ service_name=os.getenv("SERVICE_NAME", "chord-bot-api"),
18
+ )
19
+
20
  def identify_chord(notes):
21
  """
22
  Identify chord name from a list of notes using dictionary lookup.