Spaces:
Sleeping
Sleeping
prithivMLmods
commited on
Commit
•
e09c2ec
1
Parent(s):
5558c42
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,49 @@ mood_prompts = {
|
|
34 |
"Empathetic": "Respond in a warm and understanding tone.",
|
35 |
"Optimistic": "Respond in a positive, hopeful manner.",
|
36 |
"Sarcastic": "Respond with a hint of sarcasm.",
|
37 |
-
"Motivational": "Respond with encouragement and motivation."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
}
|
39 |
|
40 |
def generate_response(user_input, chat_history, mood):
|
@@ -73,7 +115,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as iface:
|
|
73 |
|
74 |
mood_selector = gr.Radio(choices=list(mood_prompts.keys()), value="Professional", label="Select Mood")
|
75 |
|
76 |
-
generate_button = gr.Button("Generate Response")
|
77 |
generate_button.click(
|
78 |
fn=generate_response,
|
79 |
inputs=[chat_input, chat_history_state, mood_selector],
|
|
|
34 |
"Empathetic": "Respond in a warm and understanding tone.",
|
35 |
"Optimistic": "Respond in a positive, hopeful manner.",
|
36 |
"Sarcastic": "Respond with a hint of sarcasm.",
|
37 |
+
"Motivational": "Respond with encouragement and motivation.",
|
38 |
+
"Curious": "Respond with a sense of wonder and curiosity.",
|
39 |
+
"Humorous": "Respond with a touch of humor.",
|
40 |
+
"Cautious": "Respond with careful consideration and caution.",
|
41 |
+
"Assertive": "Respond with confidence and assertiveness.",
|
42 |
+
"Friendly": "Respond in a warm and friendly manner.",
|
43 |
+
"Romantic": "Respond with affection and romance.",
|
44 |
+
"Nostalgic": "Respond with a sense of longing for the past.",
|
45 |
+
"Grateful": "Respond with gratitude and appreciation.",
|
46 |
+
"Inspirational": "Respond with inspiration and positivity.",
|
47 |
+
"Casual": "Respond in a relaxed and informal tone.",
|
48 |
+
"Formal": "Respond with a high level of formality.",
|
49 |
+
"Pessimistic": "Respond with a focus on potential negatives.",
|
50 |
+
"Optimistic": "Respond with a focus on potential positives.",
|
51 |
+
"Excited": "Respond with enthusiasm and excitement.",
|
52 |
+
"Melancholic": "Respond with a sense of sadness or longing.",
|
53 |
+
"Confident": "Respond with self-assurance and confidence.",
|
54 |
+
"Suspicious": "Respond with caution and doubt.",
|
55 |
+
"Reflective": "Respond with deep thought and introspection.",
|
56 |
+
"Joyful": "Respond with happiness and joy.",
|
57 |
+
"Mysterious": "Respond with an air of mystery and intrigue.",
|
58 |
+
"Aggressive": "Respond with force and intensity.",
|
59 |
+
"Calm": "Respond with a sense of peace and tranquility.",
|
60 |
+
"Gloomy": "Respond with a sense of sadness or pessimism.",
|
61 |
+
"Encouraging": "Respond with words of support and encouragement.",
|
62 |
+
"Sympathetic": "Respond with understanding and compassion.",
|
63 |
+
"Disappointed": "Respond with a tone of disappointment.",
|
64 |
+
"Proud": "Respond with a sense of pride and accomplishment.",
|
65 |
+
"Playful": "Respond in a fun and playful manner.",
|
66 |
+
"Inquisitive": "Respond with curiosity and interest.",
|
67 |
+
"Supportive": "Respond with reassurance and support.",
|
68 |
+
"Reluctant": "Respond with hesitation and reluctance.",
|
69 |
+
"Confused": "Respond with uncertainty and confusion.",
|
70 |
+
"Energetic": "Respond with high energy and enthusiasm.",
|
71 |
+
"Relaxed": "Respond with a calm and laid-back tone.",
|
72 |
+
"Grumpy": "Respond with a touch of irritation.",
|
73 |
+
"Hopeful": "Respond with a sense of hope and optimism.",
|
74 |
+
"Indifferent": "Respond with a lack of strong emotion.",
|
75 |
+
"Surprised": "Respond with shock and astonishment.",
|
76 |
+
"Sarcastic": "Respond with irony and wit.",
|
77 |
+
"Tense": "Respond with a sense of urgency or anxiety.",
|
78 |
+
"Enthusiastic": "Respond with eagerness and excitement.",
|
79 |
+
"Worried": "Respond with concern and apprehension."
|
80 |
}
|
81 |
|
82 |
def generate_response(user_input, chat_history, mood):
|
|
|
115 |
|
116 |
mood_selector = gr.Radio(choices=list(mood_prompts.keys()), value="Professional", label="Select Mood")
|
117 |
|
118 |
+
generate_button = gr.Button("Generate Response -- If response count reaches the limit: refresh & try again")
|
119 |
generate_button.click(
|
120 |
fn=generate_response,
|
121 |
inputs=[chat_input, chat_history_state, mood_selector],
|