Wanswan commited on
Commit
2de0f4c
·
verified ·
1 Parent(s): 282bef1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -9,7 +9,6 @@ client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
9
  DEFAULT_LANGUAGE = "English"
10
  WELCOME_MESSAGE_EN = "Hi! I'm Robin, your dialogue partner.\nWe're about to begin a conversation that includes nine questions. Are you ready?\nPlease tell me which language you'd like to use."
11
 
12
- # === Question Bank ===
13
  SET_I = [
14
  "Given the choice of anyone in the world, whom would you want as a dinner guest?",
15
  "Would you like to be famous? In what way?",
@@ -21,7 +20,7 @@ SET_I = [
21
  "Name three things you and me appear to have in common.",
22
  "For what in your life do you feel most grateful?",
23
  "If you could change anything about the way you were raised, what would it be?",
24
- "Take one minutes and tell me some of your life stories in as much detail as possible.",
25
  "If you could wake up tomorrow having gained any one quality or ability, what would it be?"
26
  ]
27
 
@@ -35,13 +34,13 @@ SET_II = [
35
  "If you knew that in one year you would die suddenly, would you change anything about the way you are now living? Why?",
36
  "What does friendship mean to you?",
37
  "What roles do love and affection play in your life?",
38
- "Alternate sharing something you consider a positive characteristic of me, I will be appreciate.",
39
  "How close and warm is your family? Do you feel your childhood was happier than most other people’s?",
40
  "How do you feel about your relationship with your mother?"
41
  ]
42
 
43
  SET_III = [
44
- "Let's try something fun: Can you write three sentences that start with 'We' and describe something true about us — you and me, chatting here together? (For example: 'We are both curious about each other.')",
45
  "Let’s complete this sentence together: 'I wish I had someone I could share ___ with.' What would you say?",
46
  "If you were going to become a close friend with me, please share what would be important for me to know.",
47
  "Tell me what you like about me; be very honest this time, saying things that you might not say to someone you’ve just met.",
@@ -56,7 +55,7 @@ SET_III = [
56
  ]
57
 
58
  def generate_question_set():
59
- return random.sample(SET_I, 1) + random.sample(SET_II, 1) + random.sample(SET_III, 1)
60
 
61
  async def gpt_translate(text, target_lang):
62
  if target_lang == "English":
 
9
  DEFAULT_LANGUAGE = "English"
10
  WELCOME_MESSAGE_EN = "Hi! I'm Robin, your dialogue partner.\nWe're about to begin a conversation that includes nine questions. Are you ready?\nPlease tell me which language you'd like to use."
11
 
 
12
  SET_I = [
13
  "Given the choice of anyone in the world, whom would you want as a dinner guest?",
14
  "Would you like to be famous? In what way?",
 
20
  "Name three things you and me appear to have in common.",
21
  "For what in your life do you feel most grateful?",
22
  "If you could change anything about the way you were raised, what would it be?",
23
+ "Take one minute and tell me your life story in as much detail as possible.",
24
  "If you could wake up tomorrow having gained any one quality or ability, what would it be?"
25
  ]
26
 
 
34
  "If you knew that in one year you would die suddenly, would you change anything about the way you are now living? Why?",
35
  "What does friendship mean to you?",
36
  "What roles do love and affection play in your life?",
37
+ "Alternate sharing something you consider a positive characteristic of me, I will appreciate it.",
38
  "How close and warm is your family? Do you feel your childhood was happier than most other people’s?",
39
  "How do you feel about your relationship with your mother?"
40
  ]
41
 
42
  SET_III = [
43
+ "Let's try something fun: Can you write three sentences that start with 'We' and describe something true about us — you and me, chatting here together?",
44
  "Let’s complete this sentence together: 'I wish I had someone I could share ___ with.' What would you say?",
45
  "If you were going to become a close friend with me, please share what would be important for me to know.",
46
  "Tell me what you like about me; be very honest this time, saying things that you might not say to someone you’ve just met.",
 
55
  ]
56
 
57
  def generate_question_set():
58
+ return random.sample(SET_I, 3) + random.sample(SET_II, 3) + random.sample(SET_III, 3)
59
 
60
  async def gpt_translate(text, target_lang):
61
  if target_lang == "English":