Rob Learsch commited on
Commit
3a39aa9
·
1 Parent(s): 6e3f9a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -128,7 +128,8 @@ def chat_with_musician(user_input, history, artist):
128
  messages.append({"role": "user", "content": system_message + "\n\n" + user_input})
129
 
130
  try:
131
- response = client.chat_completion(
 
132
  messages=messages,
133
  max_tokens=256,
134
  temperature=0.75,
@@ -143,7 +144,8 @@ def chat_with_musician(user_input, history, artist):
143
  if len(messages) > 1 and lyric_response == messages[-2]["content"]:
144
  messages[-1] = {"role": "user", "content": system_message_repeated + "\n\n" + user_input}
145
  try:
146
- response = client.chat_completion(
 
147
  messages=messages,
148
  max_tokens=256,
149
  temperature=0.75,
@@ -207,7 +209,6 @@ size = 350 #256
207
  # Initialize Hugging Face Inference Client
208
  client = InferenceClient(token=HF_API_KEY,
209
  #model="MiniMaxAI/MiniMax-M2.1",)
210
- model="google/gemma-2-2b-it",
211
  )
212
 
213
 
 
128
  messages.append({"role": "user", "content": system_message + "\n\n" + user_input})
129
 
130
  try:
131
+ response = client.chat.completions.create(
132
+ model="zai-org/GLM-4.7-Flash",
133
  messages=messages,
134
  max_tokens=256,
135
  temperature=0.75,
 
144
  if len(messages) > 1 and lyric_response == messages[-2]["content"]:
145
  messages[-1] = {"role": "user", "content": system_message_repeated + "\n\n" + user_input}
146
  try:
147
+ response = client.chat.completions.create(
148
+ model="zai-org/GLM-4.7-Flash",
149
  messages=messages,
150
  max_tokens=256,
151
  temperature=0.75,
 
209
  # Initialize Hugging Face Inference Client
210
  client = InferenceClient(token=HF_API_KEY,
211
  #model="MiniMaxAI/MiniMax-M2.1",)
 
212
  )
213
 
214