TroglodyteDerivations
commited on
Commit
•
32e8892
1
Parent(s):
7a36f92
Updated lines 77-81
Browse files
app.py
CHANGED
@@ -74,6 +74,12 @@ clean_transcript = remove_punctuation(transcript)
|
|
74 |
st.write(clean_transcript)
|
75 |
|
76 |
# Part F: Populate Trellis
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
def get_trellis(emission, tokens, blank_id=0):
|
78 |
num_frame = emission.size(0)
|
79 |
num_tokens = len(tokens)
|
|
|
74 |
st.write(clean_transcript)
|
75 |
|
76 |
# Part F: Populate Trellis
|
77 |
+
updated_clean_UPPERCASE_transcript = "OH||HI||ITS||ME||ABBY||CADABBY||DO||YOU||WANT||TO||WATCH||ME||PRACTICE||MY||MAGIC||I||AM||GOING||TO||TURN||THIS"
|
78 |
+
dictionary = {c: i for i, c in enumerate(labels)}
|
79 |
+
|
80 |
+
tokens = [dictionary[c] for c in transcript]
|
81 |
+
st.write(list(zip(transcript, tokens)))
|
82 |
+
|
83 |
def get_trellis(emission, tokens, blank_id=0):
|
84 |
num_frame = emission.size(0)
|
85 |
num_tokens = len(tokens)
|