walaa2022 commited on
Commit
d0dde6e
·
verified ·
1 Parent(s): afe3487

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -71,7 +71,8 @@ def generate_ai_response(prompt, simulate=False):
71
  return "AI response simulation: Based on your financial data, I recommend focusing on extending runway, accelerating revenue growth, and preparing for your next funding round."
72
  else:
73
  try:
74
- model = genai.GenerativeModel('gemini-pro')
 
75
  response = model.generate_content(prompt)
76
  return response.text
77
  except Exception as e:
@@ -79,6 +80,7 @@ def generate_ai_response(prompt, simulate=False):
79
  return "Sorry, I couldn't generate a response at this time."
80
 
81
 
 
82
  def autoplay_audio(audio_content):
83
  """Generate HTML with audio player that auto-plays"""
84
  b64 = base64.b64encode(audio_content).decode()
 
71
  return "AI response simulation: Based on your financial data, I recommend focusing on extending runway, accelerating revenue growth, and preparing for your next funding round."
72
  else:
73
  try:
74
+ # Use the correct model name
75
+ model = genai.GenerativeModel('gemini-1.0-pro') # Updated model name
76
  response = model.generate_content(prompt)
77
  return response.text
78
  except Exception as e:
 
80
  return "Sorry, I couldn't generate a response at this time."
81
 
82
 
83
+
84
  def autoplay_audio(audio_content):
85
  """Generate HTML with audio player that auto-plays"""
86
  b64 = base64.b64encode(audio_content).decode()