Update app.py
Browse files
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
|
|
|
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()
|