Rob Learsch commited on
Commit
0a2cd85
·
1 Parent(s): 3a39aa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -134,7 +134,7 @@ def chat_with_musician(user_input, history, artist):
134
  max_tokens=256,
135
  temperature=0.75,
136
  )
137
- gemma_response = response["choices"][0]["message"]["content"]
138
  except Exception as e:
139
  gemma_response = f"Error: {str(e)}"
140
 
@@ -150,7 +150,7 @@ def chat_with_musician(user_input, history, artist):
150
  max_tokens=256,
151
  temperature=0.75,
152
  )
153
- gemma_response = response["choices"][0]["message"]["content"]
154
  except Exception as e:
155
  gemma_response = f"Error: {str(e)}"
156
  lyric_response = artist_response(gemma_response, artist)
 
134
  max_tokens=256,
135
  temperature=0.75,
136
  )
137
+ gemma_response = response.choices[0].message.content
138
  except Exception as e:
139
  gemma_response = f"Error: {str(e)}"
140
 
 
150
  max_tokens=256,
151
  temperature=0.75,
152
  )
153
+ gemma_response = response.choices[0].message.content
154
  except Exception as e:
155
  gemma_response = f"Error: {str(e)}"
156
  lyric_response = artist_response(gemma_response, artist)