Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,24 +59,19 @@ def inference(audio, state=""):
|
|
| 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.
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
Example Transcript4: I need to buy a birthday
|
| 76 |
-
Example Prediction4: Present, Gift, Cake, Card
|
| 77 |
-
|
| 78 |
-
Incomplete Transcript:
|
| 79 |
-
"""
|
| 80 |
text = PROMPT + result.text + "Prediction: "
|
| 81 |
|
| 82 |
openai.api_key = os.environ["Openai_APIkey"]
|
|
|
|
| 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.
|
| 62 |
+
Predict the next few words in the transcript to complete the sentence.
|
| 63 |
+
A few examples of transcripts and predictions are provided below:
|
| 64 |
+
|
| 65 |
+
Example Transcript1: Tomorrow night we're going out to
|
| 66 |
+
Example Prediction1: The Movies, A Restaurant, A Baseball Game, The Theater, A Party for a friend
|
| 67 |
+
Example Transcript2: I would like to order a cheeseburger with a side of
|
| 68 |
+
Example Prediction2: French fries, Milkshake, Apple slices, Side salad, Extra katsup
|
| 69 |
+
Example Transcript3: My friend Savanah is
|
| 70 |
+
Example Prediction3: An elecrical engineer, A marine biologist, A classical musician
|
| 71 |
+
Example Transcript4: I need to buy a birthday
|
| 72 |
+
Example Prediction4: Present, Gift, Cake, Card
|
| 73 |
+
|
| 74 |
+
Incomplete Transcript: """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
text = PROMPT + result.text + "Prediction: "
|
| 76 |
|
| 77 |
openai.api_key = os.environ["Openai_APIkey"]
|