Update Home.py
Browse files
Home.py
CHANGED
@@ -1,13 +1,20 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
import streamlit as st
|
3 |
+
from datasets import Dataset
|
4 |
+
|
5 |
+
|
6 |
+
st.title("Convolutional Neural Networks")
|
7 |
+
#pd.read_csv("C:\Users\lenovo\OneDrive\Desktop\output.csv")
|
8 |
+
uploaded_file = st.file_uploader(r"C:\Users\lenovo\OneDrive\Desktop\output.csv", type="csv")
|
9 |
+
|
10 |
+
# Check if a file is uploaded
|
11 |
+
if uploaded_file is not None:
|
12 |
+
# Read the CSV file into a Pandas DataFrame
|
13 |
+
df = pd.read_csv(uploaded_file).sample(10)
|
14 |
+
|
15 |
+
# Display the Pandas DataFrame
|
16 |
+
st.write("Here is the DataFrame loaded from your CSV file:")
|
17 |
+
st.dataframe(df)
|
18 |
+
|
19 |
+
# Optionally, convert the DataFrame to a Hugging Face Dataset
|
20 |
+
hf_dataset = Dataset.from_pandas(df)
|