Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,6 +54,7 @@ def inference(audio, state=""):
|
|
| 54 |
options = whisper.DecodingOptions(fp16 = False)
|
| 55 |
# transcribe speech to text
|
| 56 |
result = whisper.decode(model, mel, options)
|
|
|
|
| 57 |
|
| 58 |
PROMPT = """The following is a transcript of a verbal conversation. Predict the next few words in the conversation as a list of options.
|
| 59 |
A few examples are provided below and then the current transcript is provided.
|
|
@@ -75,8 +76,8 @@ def inference(audio, state=""):
|
|
| 75 |
model="text-ada-001",
|
| 76 |
#model="text-curie-001",
|
| 77 |
prompt=text,
|
| 78 |
-
temperature=
|
| 79 |
-
max_tokens=
|
| 80 |
n=5)
|
| 81 |
infers =[]
|
| 82 |
for i in range(5):
|
|
|
|
| 54 |
options = whisper.DecodingOptions(fp16 = False)
|
| 55 |
# transcribe speech to text
|
| 56 |
result = whisper.decode(model, mel, options)
|
| 57 |
+
print("result pre gp model from whisper: ", result, ".text ", result.text)
|
| 58 |
|
| 59 |
PROMPT = """The following is a transcript of a verbal conversation. Predict the next few words in the conversation as a list of options.
|
| 60 |
A few examples are provided below and then the current transcript is provided.
|
|
|
|
| 76 |
model="text-ada-001",
|
| 77 |
#model="text-curie-001",
|
| 78 |
prompt=text,
|
| 79 |
+
temperature=2,
|
| 80 |
+
max_tokens=7,
|
| 81 |
n=5)
|
| 82 |
infers =[]
|
| 83 |
for i in range(5):
|