Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ model = model.to('cpu')
|
|
8 |
|
9 |
title = "π± ManoVyadh π±"
|
10 |
description = "Mental Health Counselling Chatbot"
|
11 |
-
examples = [
|
12 |
|
13 |
def predict(message, history):
|
14 |
def formatted_prompt(question)-> str:
|
@@ -29,10 +29,10 @@ def predict(message, history):
|
|
29 |
generation_config = GenerationConfig(
|
30 |
penalty_alpha=0.6,
|
31 |
early_stopping=True,
|
32 |
-
num_beams=
|
33 |
do_sample=True,
|
34 |
top_k=5,
|
35 |
-
temperature=0.
|
36 |
repetition_penalty=1.2,
|
37 |
max_new_tokens=64,
|
38 |
eos_token_id=tokenizer.eos_token_id,
|
|
|
8 |
|
9 |
title = "π± ManoVyadh π±"
|
10 |
description = "Mental Health Counselling Chatbot"
|
11 |
+
examples = ["I have been feeling more and more down for over a month. I have started having trouble sleeping due to panic attacks, but they are almost never triggered by something that I know of.", "I self-harm, and I stop for a while. Then when I see something sad or depressing, I automatically want to self-harm.", "I am feeling sad for my friend's divorce"]
|
12 |
|
13 |
def predict(message, history):
|
14 |
def formatted_prompt(question)-> str:
|
|
|
29 |
generation_config = GenerationConfig(
|
30 |
penalty_alpha=0.6,
|
31 |
early_stopping=True,
|
32 |
+
num_beams=2,
|
33 |
do_sample=True,
|
34 |
top_k=5,
|
35 |
+
temperature=0.7,
|
36 |
repetition_penalty=1.2,
|
37 |
max_new_tokens=64,
|
38 |
eos_token_id=tokenizer.eos_token_id,
|