Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,16 +58,16 @@ def inference(audio, state=""):
|
|
| 58 |
result = whisper.decode(model, mel, options)
|
| 59 |
print("result pre gp model from whisper: ", result, ".text ", result.text, "and the data type: ", type(result.text))
|
| 60 |
|
| 61 |
-
PROMPT = """The following is an incomplete transcript of a brief conversation. Predict the next most probable words
|
| 62 |
Some examples:
|
| 63 |
Transcript1: Tomorrow night we're going out to
|
| 64 |
-
Predictions1:
|
| 65 |
Transcript2: I would like to order a cheeseburger with a side of
|
| 66 |
-
Predictions2:
|
| 67 |
Transcript3: My friend Savanah is
|
| 68 |
-
Predictions3:
|
| 69 |
Transcript4: I need to buy a birthday
|
| 70 |
-
Predictions4:
|
| 71 |
|
| 72 |
Transcript5: """
|
| 73 |
text = PROMPT + result.text + "Prediction5: "
|
|
|
|
| 58 |
result = whisper.decode(model, mel, options)
|
| 59 |
print("result pre gp model from whisper: ", result, ".text ", result.text, "and the data type: ", type(result.text))
|
| 60 |
|
| 61 |
+
PROMPT = """The following is an incomplete transcript of a brief conversation. Predict a list of the next most probable words to complete the sentence.
|
| 62 |
Some examples:
|
| 63 |
Transcript1: Tomorrow night we're going out to
|
| 64 |
+
Predictions1: the movies, a restaurant, a baseball game, the theater, a party for a friend
|
| 65 |
Transcript2: I would like to order a cheeseburger with a side of
|
| 66 |
+
Predictions2: french fries, milkshake, apple slices, salad, extra catsup
|
| 67 |
Transcript3: My friend Savanah is
|
| 68 |
+
Predictions3: an electrical engineer, a marine biologist, a classical musician
|
| 69 |
Transcript4: I need to buy a birthday
|
| 70 |
+
Predictions4: present, gift, cake, card
|
| 71 |
|
| 72 |
Transcript5: """
|
| 73 |
text = PROMPT + result.text + "Prediction5: "
|