Isaac454 commited on
Commit
a8ae076
·
verified ·
1 Parent(s): 9364da0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -3,6 +3,7 @@ import requests
3
  from smolagents import LiteLLMModel, ToolCallingAgent, Tool
4
  import wikipedia
5
  import gradio as gr
 
6
 
7
  # Optional: Hugging Face token (for private models)
8
  HF_TOKEN = os.getenv("HF_TOKEN")
@@ -34,12 +35,9 @@ class LoadCsvTool(Tool):
34
  }
35
  }
36
  output_type = "pd.DataFrame"
37
-
38
- import pandas as pd
39
 
40
- def load_csv(file_path: str) -> pd.DataFrame:
41
- """Load a CSV file from the system"""
42
- return pd.read_csv(file_path)
43
  # The original path caused a SyntaxError due to backslashes being interpreted as escape sequences.
44
  # Also, the path was incorrectly wrapped in an extra set of double quotes.
45
  # Using a raw string (r"...") prevents this. Note: This path is a local Windows path
 
3
  from smolagents import LiteLLMModel, ToolCallingAgent, Tool
4
  import wikipedia
5
  import gradio as gr
6
+ import pandas as Pd
7
 
8
  # Optional: Hugging Face token (for private models)
9
  HF_TOKEN = os.getenv("HF_TOKEN")
 
35
  }
36
  }
37
  output_type = "pd.DataFrame"
 
 
38
 
39
+ def load_csv(file_path: str) -> pd.DataFrame:
40
+ return pd.read_csv(file_path)
 
41
  # The original path caused a SyntaxError due to backslashes being interpreted as escape sequences.
42
  # Also, the path was incorrectly wrapped in an extra set of double quotes.
43
  # Using a raw string (r"...") prevents this. Note: This path is a local Windows path