Spaces:
Sleeping
Sleeping
shrutisd1003
commited on
Commit
•
75f0316
1
Parent(s):
abb31f0
added data.csv to gitignore
Browse files- .gitignore +2 -0
- data.csv +0 -0
- data_loader.py +2 -0
.gitignore
CHANGED
@@ -7,6 +7,8 @@ __pycache__/
|
|
7 |
# C extensions
|
8 |
*.so
|
9 |
|
|
|
|
|
10 |
#Env variables
|
11 |
.env
|
12 |
# Distribution / packaging
|
|
|
7 |
# C extensions
|
8 |
*.so
|
9 |
|
10 |
+
# data set
|
11 |
+
./data.csv
|
12 |
#Env variables
|
13 |
.env
|
14 |
# Distribution / packaging
|
data.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
data_loader.py
CHANGED
@@ -11,6 +11,8 @@ class DataLoader:
|
|
11 |
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
|
12 |
if uploaded_file is not None:
|
13 |
self.data = pd.read_csv(uploaded_file)
|
|
|
|
|
14 |
elif data_source == 'Input a URL':
|
15 |
url = st.text_input('Enter the URL of a CSV file')
|
16 |
if url:
|
|
|
11 |
uploaded_file = st.file_uploader("Choose a CSV file", type="csv")
|
12 |
if uploaded_file is not None:
|
13 |
self.data = pd.read_csv(uploaded_file)
|
14 |
+
file_path = './data.csv'
|
15 |
+
self.data.to_csv(file_path, index=False)
|
16 |
elif data_source == 'Input a URL':
|
17 |
url = st.text_input('Enter the URL of a CSV file')
|
18 |
if url:
|