simonraj commited on
Commit
47fe36b
·
1 Parent(s): 46a42d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -32,17 +32,14 @@ def intelligent_tutor(audio_file, provide_hints=False):
32
  global user_input_counter
33
  global conversation_history
34
 
35
- input_text = transcribe_audio(audio_file)
36
- current_question = questions[current_question_index]
37
-
38
  if provide_hints:
39
- hint_message = f"[Tamil translation of: Consider using the {strategy_text[current_question_index]} to answer the question: '{questions[current_question_index]}']." # Translate to Tamil
40
- return f"[Tamil translation of: Respond to this Question: {questions[current_question_index]}]", hint_message
41
 
42
  conversation = [
43
  {
44
  "role": "system",
45
- "content": f"[Tamil translation of: You are an expert Tamil Language Teacher guiding a student. The student is answering the question: '{questions[current_question_index]}'. Based on their response, provide direct feedback to help them improve their spoken skills. Emphasize areas of strength, suggest areas of improvement, and guide them on how to better answer using the {strategy_text[current_question_index]} strategy. The feedback should be in second person, addressing the student directly.]"
46
  },
47
  {"role": "user", "content": input_text}
48
  ]
 
32
  global user_input_counter
33
  global conversation_history
34
 
 
 
 
35
  if provide_hints:
36
+ hint_message = f"考虑使用 {strategy_text[current_question_index]} 策略来回答这个问题:'{questions[current_question_index]}'" # Translated to Simplified Chinese
37
+ return f"请回答这个问题:{questions[current_question_index]}", hint_message
38
 
39
  conversation = [
40
  {
41
  "role": "system",
42
+ "content": f"你是一名专家级的中文老师,正在指导一名学生。学生正在回答这个问题:'{questions[current_question_index]}'。根据他们的回答,为他们提供直接的反馈,以帮助他们提高口语技能。强调他们的优点,建议改进的地方,并指导他们如何使用 {strategy_text[current_question_index]} 策略更好地回答。反馈应该用第二人称,直接向学生发言。"
43
  },
44
  {"role": "user", "content": input_text}
45
  ]