zayeem00 commited on
Commit
8de4e5a
1 Parent(s): e8a1ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -13,12 +13,9 @@ def financial_planning(prompt, api_key):
13
  model="gpt-4o",
14
  messages= message,
15
  max_tokens=1000,
16
- temperature=0.7,
17
- stream =True
18
- )
19
- for chunk in response:
20
- stream = chunk.choices[0].delta.content
21
- yield stream
22
 
23
  def generate_advice(name, age, income, expenses, savings, debts, investment_preferences, risk_tolerance, retirement_age, retirement_savings_goal, short_term_goals, long_term_goals, dependents, health_expenses, education_expenses, insurance_policies, major_purchases, emergency_fund, annual_income_growth, annual_expense_growth, currency, api_key):
24
  prompt = (
 
13
  model="gpt-4o",
14
  messages= message,
15
  max_tokens=1000,
16
+ temperature=0.7)
17
+
18
+ return response.choices[0]["message"]["content"]
 
 
 
19
 
20
  def generate_advice(name, age, income, expenses, savings, debts, investment_preferences, risk_tolerance, retirement_age, retirement_savings_goal, short_term_goals, long_term_goals, dependents, health_expenses, education_expenses, insurance_policies, major_purchases, emergency_fund, annual_income_growth, annual_expense_growth, currency, api_key):
21
  prompt = (