Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,10 @@ def inference(audio):
|
|
44 |
# transcribe speech to text
|
45 |
result = whisper.decode(model, mel, options)
|
46 |
|
47 |
-
# Added prompt
|
48 |
prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
49 |
### code
|
50 |
-
input_ids = tokenizer(
|
51 |
print("inputs ", input_ids)
|
52 |
|
53 |
# prompt length
|
|
|
44 |
# transcribe speech to text
|
45 |
result = whisper.decode(model, mel, options)
|
46 |
|
47 |
+
# Added prompt below
|
48 |
prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
49 |
### code
|
50 |
+
input_ids = tokenizer(result.text, return_tensors="pt").input_ids
|
51 |
print("inputs ", input_ids)
|
52 |
|
53 |
# prompt length
|