Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,6 +47,7 @@ def inference(audio, state=""):
|
|
| 47 |
options = whisper.DecodingOptions(fp16 = False)
|
| 48 |
# transcribe speech to text
|
| 49 |
result = whisper.decode(model, mel, options)
|
|
|
|
| 50 |
|
| 51 |
# Added prompt below
|
| 52 |
input_prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
|
@@ -96,6 +97,8 @@ def inference(audio, state=""):
|
|
| 96 |
state = getText
|
| 97 |
print(state)
|
| 98 |
gt = [gt['generated_text'] for gt in state]
|
|
|
|
|
|
|
| 99 |
|
| 100 |
# result.text
|
| 101 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
|
|
|
| 47 |
options = whisper.DecodingOptions(fp16 = False)
|
| 48 |
# transcribe speech to text
|
| 49 |
result = whisper.decode(model, mel, options)
|
| 50 |
+
result_len = len(result.text)
|
| 51 |
|
| 52 |
# Added prompt below
|
| 53 |
input_prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
|
|
|
| 97 |
state = getText
|
| 98 |
print(state)
|
| 99 |
gt = [gt['generated_text'] for gt in state]
|
| 100 |
+
print(type(gt))
|
| 101 |
+
|
| 102 |
|
| 103 |
# result.text
|
| 104 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|