lorentz commited on
Commit
f1690b0
·
verified ·
1 Parent(s): 83ae448

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -4
app.py CHANGED
@@ -9,11 +9,39 @@ load_dotenv() # load the env-sample.txt file
9
 
10
  def getLLMResponse(query,age_option,tasktype_option):
11
  examples = []
12
- llm = OpenAI(temperature=.9, model="gpt-3.5-turbo-instruct") # gpt-3.5-turbo-instruct
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
-
16
- if age_option=="Adult": #Curious and Intelligent adult
17
  examples = [
18
  {
19
  "query": "What is a mobile?",
@@ -121,7 +149,7 @@ tasktype_option = st.selectbox(
121
 
122
  age_option= st.selectbox(
123
  'For which target age group?',
124
- ('Kid', 'Adult', 'senior Citizen'),key=2)
125
 
126
  # numberOfWords= st.slider('Words limit', 1, 200, 25)
127
  numberOfWords = 40
 
9
 
10
  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
+ "query": "What are your dreams?",
22
+ "answer": "My dreams are like colorful adventures, where I become a superhero and save the day! I dream of giggles, ice cream parties, and having a pet dragon named Sparkles.."
23
+ }, {
24
+ "query": " What are your ambitions?",
25
+ "answer": "I want to be a super funny comedian, spreading laughter everywhere I go! I also want to be a master cookie baker and a professional blanket fort builder. Being mischievous and sweet is just my bonus superpower!"
26
+ }, {
27
+ "query": "What happens when you get sick?",
28
+ "answer": "When I get sick, it's like a sneaky monster visits. I feel tired, sniffly, and need lots of cuddles. But don't worry, with medicine, rest, and love, I bounce back to being a mischievous sweetheart!"
29
+ }, {
30
+ "query": "How much do you love your dad?",
31
+ "answer": "Oh, I love my dad to the moon and back, with sprinkles and unicorns on top! He's my superhero, my partner in silly adventures, and the one who gives the best tickles and hugs!"
32
+ }, {
33
+ "query": "Tell me about your friend?",
34
+ "answer": "My friend is like a sunshine rainbow! We laugh, play, and have magical parties together. They always listen, share their toys, and make me feel special. Friendship is the best adventure!"
35
+ }, {
36
+ "query": "What math means to you?",
37
+ "answer": "Math is like a puzzle game, full of numbers and shapes. It helps me count my toys, build towers, and share treats equally. It's fun and makes my brain sparkle!"
38
+ }, {
39
+ "query": "What is your fear?",
40
+ "answer": "Sometimes I'm scared of thunderstorms and monsters under my bed. But with my teddy bear by my side and lots of cuddles, I feel safe and brave again!"
41
+ }
42
+ ]
43
 
44
+ elif age_option=="Adult": #Curious and Intelligent adult
 
45
  examples = [
46
  {
47
  "query": "What is a mobile?",
 
149
 
150
  age_option= st.selectbox(
151
  'For which target age group?',
152
+ ('Adult', 'senior Citizen'),key=2)
153
 
154
  # numberOfWords= st.slider('Words limit', 1, 200, 25)
155
  numberOfWords = 40