Spaces:
Build error
Build error
rjorgec
commited on
Initialize metrics with environment variables
Browse files
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.
|