Aditya-1911 commited on
Commit
6f3be52
·
verified ·
1 Parent(s): 921f80f

Delete csv_agent.py

Browse files
Files changed (1) hide show
  1. csv_agent.py +0 -22
csv_agent.py DELETED
@@ -1,22 +0,0 @@
1
- import os
2
- from huggingface_hub import InferenceClient
3
-
4
- client = InferenceClient(
5
- model="tiiuae/falcon-7b-instruct",
6
- token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
7
- )
8
-
9
- def generate_code(prompt):
10
- full_prompt = f"""You are a Python Data Scientist expert.
11
- Given the following instruction, write correct Python pandas code to operate on a dataframe called df.
12
- Instruction: {prompt}
13
- Output only valid Python code without any explanation."""
14
-
15
- response = client.text_generation(
16
- prompt=full_prompt,
17
- max_new_tokens=300,
18
- temperature=0.2,
19
- top_p=0.95,
20
- repetition_penalty=1.1
21
- )
22
- return response