Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ personality_model = AutoModelForSequenceClassification.from_pretrained("KevSun/P
|
|
9 |
personality_tokenizer = AutoTokenizer.from_pretrained("KevSun/Personality_LM")
|
10 |
|
11 |
# Initialize the LLM client (HuggingFaceH4/zephyr-7b-beta)
|
12 |
-
llm_client = InferenceClient("
|
13 |
|
14 |
def analyze_personality(text):
|
15 |
"""
|
@@ -70,9 +70,9 @@ def generate_response(user_message, traits):
|
|
70 |
response = ""
|
71 |
for message in llm_client.chat_completion(
|
72 |
messages,
|
73 |
-
max_tokens=
|
74 |
stream=True,
|
75 |
-
temperature=0.
|
76 |
top_p=0.95
|
77 |
):
|
78 |
token = message.choices[0].delta.content
|
|
|
9 |
personality_tokenizer = AutoTokenizer.from_pretrained("KevSun/Personality_LM")
|
10 |
|
11 |
# Initialize the LLM client (HuggingFaceH4/zephyr-7b-beta)
|
12 |
+
llm_client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
13 |
|
14 |
def analyze_personality(text):
|
15 |
"""
|
|
|
70 |
response = ""
|
71 |
for message in llm_client.chat_completion(
|
72 |
messages,
|
73 |
+
max_tokens=100,
|
74 |
stream=True,
|
75 |
+
temperature=0.9,
|
76 |
top_p=0.95
|
77 |
):
|
78 |
token = message.choices[0].delta.content
|