Spaces:
son9john
/
Runtime error

son9john commited on
Commit
c2796c3
·
1 Parent(s): 71895f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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")