rairo commited on
Commit
60414d5
·
verified ·
1 Parent(s): 7236409

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,7 +11,7 @@ import tempfile
11
 
12
  # Initialize Google Gemini AI client
13
  genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
14
- client = genai.Client()
15
 
16
  def convert_excel_to_csv(excel_file):
17
  """Convert Excel file to CSV and return the DataFrame"""
@@ -46,8 +46,7 @@ def analyze_columns(df: pd.DataFrame, filename: str) -> dict:
46
  """
47
 
48
  try:
49
- response = client.models.generate_content(
50
- model="gemini-2.0-flash-thinking-exp",
51
  contents=[
52
  types.Part.from_text(f"Filename: {filename}\n\nCSV Data:\n{sample_csv}"),
53
  analysis_prompt
 
11
 
12
  # Initialize Google Gemini AI client
13
  genai.configure(api_key=os.environ["GOOGLE_API_KEY"])
14
+ client = genai.GenerativeModel('gemini-2.0-flash-thinking-exp')
15
 
16
  def convert_excel_to_csv(excel_file):
17
  """Convert Excel file to CSV and return the DataFrame"""
 
46
  """
47
 
48
  try:
49
+ response = client.generate_content(
 
50
  contents=[
51
  types.Part.from_text(f"Filename: {filename}\n\nCSV Data:\n{sample_csv}"),
52
  analysis_prompt