lorentz commited on
Commit
87934d4
·
verified ·
1 Parent(s): c286fe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -25
app.py CHANGED
@@ -11,30 +11,30 @@ def getLLMResponse(query, age_option,tasktype_option):
11
  examples = []
12
  llm = OpenAI(temperature=.9, model="gpt-3.5-turbo-instruct")
13
 
14
- if age_option=="Kid": #Silly and Sweet Kid
15
-
16
- examples = [
17
- {
18
- "query": "What is a mobile?",
19
- "answer": "A mobile is a magical device that fits in your pocket, like a mini-enchanted playground. It has games, videos, and talking pictures, but be careful, it can turn grown-ups into screen-time monsters too!"
20
- }
21
- ]
22
-
23
- elif age_option=="Adult": #Curious and Intelligent adult
24
- examples = [
25
- {
26
- "query": "What is a mobile?",
27
- "answer": "A mobile is a portable communication device, commonly known as a mobile phone or cell phone. It allows users to make calls, send messages, access the internet, and use various applications. Additionally, 'mobile' can also refer to a type of kinetic sculpture that hangs and moves in the air, often found in art installations or as decorative pieces."
28
- }
29
- ]
30
-
31
- elif age_option=="Senior Citizen": #A 90 years old guys
32
- examples = [
33
- {
34
- "query": "What is a mobile?",
35
- "answer": "A mobile, also known as a cellphone or smartphone, is a portable device that allows you to make calls, send messages, take pictures, browse the internet, and do many other things. In the last 50 years, I have seen mobiles become smaller, more powerful, and capable of amazing things like video calls and accessing information instantly."
36
- }
37
- ]
38
 
39
 
40
  example_template = """
@@ -50,7 +50,6 @@ def getLLMResponse(query, age_option,tasktype_option):
50
 
51
  prefix = """You are a {template_ageoption}, and {template_tasktype_option}, \
52
  you give one answer for each query. it is strictly limited to 1 answer only, and the answer must be less than 200 words. For tweet, you should not give more than 150 words.
53
- Here are some examples:
54
  """
55
 
56
  suffix = """
 
11
  examples = []
12
  llm = OpenAI(temperature=.9, model="gpt-3.5-turbo-instruct")
13
 
14
+ # if age_option=="Kid": #Silly and Sweet Kid
15
+ #
16
+ # examples = [
17
+ # {
18
+ # "query": "What is a mobile?",
19
+ # "answer": "A mobile is a magical device that fits in your pocket, like a mini-enchanted playground. It has games, videos, and talking pictures, but be careful, it can turn grown-ups into screen-time monsters too!"
20
+ # }
21
+ # ]
22
+ #
23
+ # elif age_option=="Adult": #Curious and Intelligent adult
24
+ # examples = [
25
+ # {
26
+ # "query": "What is a mobile?",
27
+ # "answer": "A mobile is a portable communication device, commonly known as a mobile phone or cell phone. It allows users to make calls, send messages, access the internet, and use various applications. Additionally, 'mobile' can also refer to a type of kinetic sculpture that hangs and moves in the air, often found in art installations or as decorative pieces."
28
+ # }
29
+ # ]
30
+ #
31
+ # elif age_option=="Senior Citizen": #A 90 years old guys
32
+ # examples = [
33
+ # {
34
+ # "query": "What is a mobile?",
35
+ # "answer": "A mobile, also known as a cellphone or smartphone, is a portable device that allows you to make calls, send messages, take pictures, browse the internet, and do many other things. In the last 50 years, I have seen mobiles become smaller, more powerful, and capable of amazing things like video calls and accessing information instantly."
36
+ # }
37
+ # ]
38
 
39
 
40
  example_template = """
 
50
 
51
  prefix = """You are a {template_ageoption}, and {template_tasktype_option}, \
52
  you give one answer for each query. it is strictly limited to 1 answer only, and the answer must be less than 200 words. For tweet, you should not give more than 150 words.
 
53
  """
54
 
55
  suffix = """