mskov commited on
Commit
ba35790
·
1 Parent(s): 56f463d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -58,10 +58,19 @@ 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.
62
- Based on the context provided in the transcript so far, predict the next few words in the transcript to complete the sentence.
63
- """
64
- text = PROMPT + result.text
 
 
 
 
 
 
 
 
 
65
 
66
  openai.api_key = os.environ["Openai_APIkey"]
67
 
 
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 in the transcript to complete the sentence.
62
+ Some examples:
63
+ Example Transcript1: Tomorrow night we're going out to
64
+ Example Predictions1: The Movies, A Restaurant, A Baseball Game, The Theater, A Party for a friend
65
+ Example Transcript2: I would like to order a cheeseburger with a side of
66
+ Example Predictions2: French fries, Milkshake, Apple slices, Side salad, Extra catsup
67
+ Example Transcript3: My friend Savanah is
68
+ Example Predictions3: An electrical engineer, A marine biologist, A classical musician
69
+ Example Transcript4: I need to buy a birthday
70
+ Example Predictions4: Present, Gift, Cake, Card
71
+
72
+ Incomplete Transcript: """
73
+ text = PROMPT + result.text + "Prediction: "
74
 
75
  openai.api_key = os.environ["Openai_APIkey"]
76