Kdeveloper1029 commited on
Commit
7ecbdda
·
verified ·
1 Parent(s): 3edc984

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("HuggingFaceH4/zephyr-7b-beta")
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=256,
74
  stream=True,
75
- temperature=0.7,
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