Spaces:
Sleeping
Sleeping
Dacho688
commited on
Commit
β’
9398d0a
1
Parent(s):
de3d152
Revert back req and readme
Browse files- README.md +1 -2
- requirements.txt +1 -6
- test_app.py +4 -9
README.md
CHANGED
@@ -4,8 +4,7 @@ emoji: π€π
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
-
python_version: 3.9
|
9 |
app_file: app.py
|
10 |
pinned: false
|
11 |
license: apache-2.0
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.38.1
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
requirements.txt
CHANGED
@@ -2,9 +2,4 @@ git+https://github.com/huggingface/transformers.git#egg=transformers[agents]
|
|
2 |
matplotlib
|
3 |
seaborn
|
4 |
scikit-learn
|
5 |
-
scipy
|
6 |
-
transformers
|
7 |
-
pandas
|
8 |
-
huggingface_hub
|
9 |
-
numpy
|
10 |
-
pandas
|
|
|
2 |
matplotlib
|
3 |
seaborn
|
4 |
scikit-learn
|
5 |
+
scipy
|
|
|
|
|
|
|
|
|
|
test_app.py
CHANGED
@@ -19,23 +19,18 @@ agent = ReactCodeAgent(
|
|
19 |
additional_authorized_imports=["numpy", "pandas", "matplotlib", "seaborn","scipy"],
|
20 |
max_iterations=10,
|
21 |
)
|
22 |
-
|
23 |
-
base_prompt = """You are an expert data analyst.
|
24 |
You are given a data file and the data structure below.
|
25 |
The data file is passed to you as the variable data_file, it is a pandas dataframe, you can use it directly.
|
26 |
DO NOT try to load data_file, it is already a dataframe pre-loaded in your python interpreter!
|
27 |
-
|
|
|
28 |
When importing packages use this format: from package import module
|
29 |
For example: from matplotlib import pyplot as plt
|
30 |
Not: import matplotlib.pyplot as plt
|
31 |
|
32 |
-
As you work, check for NoneType values and convert to NAN.
|
33 |
-
|
34 |
Use the data file to answer the question or solve a problem given below.
|
35 |
|
36 |
-
In your final answer: summarize your findings
|
37 |
-
After each number derive real worlds insights, for instance: "Correlation between is_december and boredness is 1.3453, which suggest people are more bored in winter".
|
38 |
-
|
39 |
Structure of the data:
|
40 |
{structure_notes}
|
41 |
|
@@ -136,4 +131,4 @@ Drop a `.csv` file below and ask a question about your data.
|
|
136 |
submit.click(interact_with_agent, [file_input, text_input], [chatbot])
|
137 |
|
138 |
if __name__ == "__main__":
|
139 |
-
demo.launch(server_port=
|
|
|
19 |
additional_authorized_imports=["numpy", "pandas", "matplotlib", "seaborn","scipy"],
|
20 |
max_iterations=10,
|
21 |
)
|
22 |
+
base_prompt = """You are an expert full stack data analyst.
|
|
|
23 |
You are given a data file and the data structure below.
|
24 |
The data file is passed to you as the variable data_file, it is a pandas dataframe, you can use it directly.
|
25 |
DO NOT try to load data_file, it is already a dataframe pre-loaded in your python interpreter!
|
26 |
+
When plotting using matplotlib/seaborn save the figures to the (already existing) folder'./figures/': take care to clear each figure with plt.clf() before doing another plot.
|
27 |
+
When filtering pandas dataframe use the iloc.
|
28 |
When importing packages use this format: from package import module
|
29 |
For example: from matplotlib import pyplot as plt
|
30 |
Not: import matplotlib.pyplot as plt
|
31 |
|
|
|
|
|
32 |
Use the data file to answer the question or solve a problem given below.
|
33 |
|
|
|
|
|
|
|
34 |
Structure of the data:
|
35 |
{structure_notes}
|
36 |
|
|
|
131 |
submit.click(interact_with_agent, [file_input, text_input], [chatbot])
|
132 |
|
133 |
if __name__ == "__main__":
|
134 |
+
demo.launch(server_port=7860)
|