Update app.py
Browse files
app.py
CHANGED
@@ -84,6 +84,11 @@ def transcribe(audio, text):
|
|
84 |
transcript = {'text': ''}
|
85 |
input_text = []
|
86 |
|
|
|
|
|
|
|
|
|
|
|
87 |
# Transcribe the audio if provided
|
88 |
if audio is not None:
|
89 |
audio_file = open(audio, "rb")
|
|
|
84 |
transcript = {'text': ''}
|
85 |
input_text = []
|
86 |
|
87 |
+
# Check if the first word of the first line is "COLORIZE"
|
88 |
+
if text and text.split("\n")[0].split(" ")[0].strip().upper() == "COLORIZE":
|
89 |
+
colorized_input = colorize_text(text)
|
90 |
+
return text, colorized_input
|
91 |
+
|
92 |
# Transcribe the audio if provided
|
93 |
if audio is not None:
|
94 |
audio_file = open(audio, "rb")
|