rairo commited on
Commit
f36a56f
·
verified ·
1 Parent(s): 202e7a2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -1850,7 +1850,7 @@ def _get_price_trend_analysis_for_chat(crop_type=None, location=None):
1850
  Analysis:
1851
  """
1852
  try:
1853
- response_obj = gemini_client.generate_content(model='gemini-2.0-flash', contents=[{'parts': [{'text': prompt}]}])
1854
  return response_obj.text.strip(), True
1855
  except Exception as e:
1856
  logger.error(f"Gemini error during price trend analysis: {e}")
@@ -1912,7 +1912,7 @@ Return exactly one of the four category names above, with no extra words or punc
1912
  """
1913
  # 2) Call Gemini for classification, with explicit logging
1914
  try:
1915
- response_obj_gemini = gemini_client.generate_content(
1916
  model='gemini-2.0-flash',
1917
  contents=[{'parts': [{'text': classify_prompt}]}]
1918
  )
 
1850
  Analysis:
1851
  """
1852
  try:
1853
+ response_obj = gemini_client.models.generate_content(model='gemini-2.0-flash', contents=[{'parts': [{'text': prompt}]}])
1854
  return response_obj.text.strip(), True
1855
  except Exception as e:
1856
  logger.error(f"Gemini error during price trend analysis: {e}")
 
1912
  """
1913
  # 2) Call Gemini for classification, with explicit logging
1914
  try:
1915
+ response_obj_gemini = gemini_client.models.generate_content(
1916
  model='gemini-2.0-flash',
1917
  contents=[{'parts': [{'text': classify_prompt}]}]
1918
  )