Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,12 +56,12 @@ def inference(audio, latest):
|
|
| 56 |
|
| 57 |
if transcript != None:
|
| 58 |
latest.append(transcript)
|
| 59 |
-
|
| 60 |
-
text = EXAMPLE_PROMPT
|
| 61 |
|
| 62 |
response = openai.Completion.create(
|
| 63 |
model="text-davinci-003",
|
| 64 |
-
prompt=
|
| 65 |
temperature=0.8,
|
| 66 |
max_tokens=18,
|
| 67 |
n=5)
|
|
|
|
| 56 |
|
| 57 |
if transcript != None:
|
| 58 |
latest.append(transcript)
|
| 59 |
+
text = EXAMPLE_PROMPT + transcript + "\nPrediction: "
|
| 60 |
+
else: text = EXAMPLE_PROMPT
|
| 61 |
|
| 62 |
response = openai.Completion.create(
|
| 63 |
model="text-davinci-003",
|
| 64 |
+
prompt=text,
|
| 65 |
temperature=0.8,
|
| 66 |
max_tokens=18,
|
| 67 |
n=5)
|