Chat with your dataset.
This project demonstrates how to interact with CSV data using a DeepSeek-R1-Distill-Qwen-32B. It integrates a streaming LLM from Hugging Face to process natural language queries on a pandas DataFrame. The project leverages langchain, pandas, and huggingface_hub to enable seamless data interaction.
(deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) for processing queries.langchain to create a pandas DataFrame agent.git clone https://github.com/DataByteSun/CSV-Data-Agent-with-DeepSeek-R1.git
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install -r requirements.txt
HUGGINGFACE_API_KEY=your_huggingface_api_key
from dotenv import load_dotenv
load_dotenv()
import pandas as pd
df = pd.read_csv("your_data.csv")
from huggingface_hub import InferenceClient
client = InferenceClient(api_key="your_huggingface_api_key")
agent = create_pandas_dataframe_agent(llm=client, df=df, verbose=True)
result = agent.invoke("how many rows are there?")
agent.invoke("how many rows are there?") may yield an output like:
。
Workflows from the Neura Market marketplace related to this DeepSeek resource