mskov commited on
Commit
3667eab
1 Parent(s): 5ab4cb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -55,21 +55,25 @@ def inference(audio, state=""):
55
  # transcribe speech to text
56
  result = whisper.decode(model, mel, options)
57
 
58
- PROMPT = """The following is a transcript of a conversation. Predict a few nouns, verbs, or adjectives that may be used next. Predict the next few words as a list of options.
59
  A few examples are provided below and then the current transcript is provided.
60
  Examples:
61
  Transcript: Tomorrow night we're going out to
62
  Next: The Movies, A Restaurant, A Baseball Game, The Theater, A Party
63
  Transcript: I would like to order a cheeseburger with a side of
64
  Next: Fries, Milkshake, Apples, Salad, Katsup
 
 
 
 
65
  """
66
  text = PROMPT + result.text
67
 
68
  openai.api_key = os.environ["Openai_APIkey"]
69
 
70
  response = openai.Completion.create(
71
- #model="text-ada-001",
72
- model="text-curie-001",
73
  prompt=text,
74
  temperature=1,
75
  max_tokens=6,
 
55
  # transcribe speech to text
56
  result = whisper.decode(model, mel, options)
57
 
58
+ PROMPT = """The following is a transcript of a verbal conversation. Predict the next few words in the conversation as a list of options.
59
  A few examples are provided below and then the current transcript is provided.
60
  Examples:
61
  Transcript: Tomorrow night we're going out to
62
  Next: The Movies, A Restaurant, A Baseball Game, The Theater, A Party
63
  Transcript: I would like to order a cheeseburger with a side of
64
  Next: Fries, Milkshake, Apples, Salad, Katsup
65
+ Transcript: My friend Savanah is
66
+ Next: An engineer, A biologist, A classical musician
67
+ Transcript: I need to buy a birthday
68
+ Next: Present, Gift, Cake, Card, Crown
69
  """
70
  text = PROMPT + result.text
71
 
72
  openai.api_key = os.environ["Openai_APIkey"]
73
 
74
  response = openai.Completion.create(
75
+ model="text-ada-001",
76
+ #model="text-curie-001",
77
  prompt=text,
78
  temperature=1,
79
  max_tokens=6,