Spaces:
Runtime error
Runtime error
Commit
•
efbaaad
1
Parent(s):
d174120
Update app.py
Browse files
app.py
CHANGED
@@ -19,9 +19,14 @@ SPEAKER_DICT = {}
|
|
19 |
SPEAKERS = []
|
20 |
|
21 |
def GetSpeaker(sp):
|
|
|
22 |
if sp not in list(SPEAKER_DICT.keys):
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
|
26 |
def GenerateSpeakerDict(sp):
|
27 |
SPEAKERS = [speaker.strip() for speaker in sp.split(',')]
|
|
|
19 |
SPEAKERS = []
|
20 |
|
21 |
def GetSpeaker(sp):
|
22 |
+
speaker = sp
|
23 |
if sp not in list(SPEAKER_DICT.keys):
|
24 |
+
if len(SPEAKERS):
|
25 |
+
SPEAKER_DICT[sp] = SPEAKERS.pop(0)
|
26 |
+
speaker = SPEAKER_DICT[sp]
|
27 |
+
else:
|
28 |
+
speaker = SPEAKER_DICT[sp]
|
29 |
+
return speaker
|
30 |
|
31 |
def GenerateSpeakerDict(sp):
|
32 |
SPEAKERS = [speaker.strip() for speaker in sp.split(',')]
|