AI-Edify commited on
Commit
9da39f9
·
verified ·
1 Parent(s): 371ca9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,11 +10,11 @@ def generate_text():
10
  response = openai.ChatCompletion.create(
11
  model="gpt-3.5-turbo",
12
  messages=[
13
- {"role": "system", "content": "Generate a short paragraph (2-3 sentences) for an English learner to read aloud."},
14
- {"role": "user", "content": "Create a practice text."}
15
  ]
16
  )
17
- return response.choices[0].message['content']
18
 
19
  def get_pronunciation_feedback(original_text, transcription):
20
  response = openai.ChatCompletion.create(
 
10
  response = openai.ChatCompletion.create(
11
  model="gpt-3.5-turbo",
12
  messages=[
13
+ {"role": "system", "content": "Generate exactly two simple sentences for English pronunciation practice. Do not include any instructions, comments, or additional text."},
14
+ {"role": "user", "content": "Create two simple sentences for pronunciation practice."}
15
  ]
16
  )
17
+ return response.choices[0].message['content'].strip()
18
 
19
  def get_pronunciation_feedback(original_text, transcription):
20
  response = openai.ChatCompletion.create(