Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,18 +58,18 @@ def inference(audio, state=""):
|
|
58 |
result = whisper.decode(model, mel, options)
|
59 |
print("result pre gp model from whisper: ", result, ".text ", result.text)
|
60 |
|
61 |
-
PROMPT = """The following is an incomplete transcript of a brief conversation.
|
62 |
-
|
63 |
-
|
64 |
Transcript: Tomorrow night we're going out to
|
65 |
-
Prediction: The Movies
|
66 |
Transcript: I would like to order a cheeseburger with a side of
|
67 |
Prediction: Frnech fries, Milkshake, Apple slices, Side salad, Extra katsup
|
68 |
Transcript: My friend Savanah is
|
69 |
Prediction: An elecrical engineer, A marine biologist, A classical musician
|
70 |
Transcript: I need to buy a birthday
|
71 |
Prediction: Present, Gift, Cake, Card
|
72 |
-
|
73 |
"""
|
74 |
text = PROMPT + result.text
|
75 |
|
|
|
58 |
result = whisper.decode(model, mel, options)
|
59 |
print("result pre gp model from whisper: ", result, ".text ", result.text)
|
60 |
|
61 |
+
PROMPT = """The following is an incomplete transcript of a brief conversation.
|
62 |
+
Predict the next few words to help the speaker complete their sentence.
|
63 |
+
A few examples are provided below:
|
64 |
Transcript: Tomorrow night we're going out to
|
65 |
+
Prediction: The Movies, A Restaurant, A Baseball Game, The Theater, A Party for a friend
|
66 |
Transcript: I would like to order a cheeseburger with a side of
|
67 |
Prediction: Frnech fries, Milkshake, Apple slices, Side salad, Extra katsup
|
68 |
Transcript: My friend Savanah is
|
69 |
Prediction: An elecrical engineer, A marine biologist, A classical musician
|
70 |
Transcript: I need to buy a birthday
|
71 |
Prediction: Present, Gift, Cake, Card
|
72 |
+
Given these examples, predict the next few words in the following sentence:
|
73 |
"""
|
74 |
text = PROMPT + result.text
|
75 |
|