Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,17 +56,17 @@ def inference(audio, state=""):
|
|
| 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
|
| 60 |
A few examples are provided below and then the current transcript is provided.
|
| 61 |
Examples:
|
| 62 |
Transcript: Tomorrow night we're going out to
|
| 63 |
-
|
| 64 |
Transcript: I would like to order a cheeseburger with a side of
|
| 65 |
-
|
| 66 |
Transcript: My friend Savanah is
|
| 67 |
-
|
| 68 |
Transcript: I need to buy a birthday
|
| 69 |
-
|
| 70 |
"""
|
| 71 |
text = PROMPT + result.text
|
| 72 |
|
|
@@ -76,7 +76,7 @@ def inference(audio, state=""):
|
|
| 76 |
model="text-ada-001",
|
| 77 |
#model="text-curie-001",
|
| 78 |
prompt=text,
|
| 79 |
-
temperature=0.
|
| 80 |
max_tokens=7,
|
| 81 |
n=5)
|
| 82 |
infers =[]
|
|
|
|
| 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 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.
|
| 61 |
Examples:
|
| 62 |
Transcript: Tomorrow night we're going out to
|
| 63 |
+
List of options: The Movies to watch a blockbuster, A Restaurant for dinner, A Baseball Game, The Theater, A Party for a friend
|
| 64 |
Transcript: I would like to order a cheeseburger with a side of
|
| 65 |
+
List of options: Frnech fries, Milkshake, Apple slices, Side salad, Extra katsup
|
| 66 |
Transcript: My friend Savanah is
|
| 67 |
+
List of options: An elecrical engineer, A marine biologist, A classical musician
|
| 68 |
Transcript: I need to buy a birthday
|
| 69 |
+
List of options: Present, Gift, Cake, Card
|
| 70 |
"""
|
| 71 |
text = PROMPT + result.text
|
| 72 |
|
|
|
|
| 76 |
model="text-ada-001",
|
| 77 |
#model="text-curie-001",
|
| 78 |
prompt=text,
|
| 79 |
+
temperature=0.9,
|
| 80 |
max_tokens=7,
|
| 81 |
n=5)
|
| 82 |
infers =[]
|