Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,14 @@ user_query = st.text_input("Enter your question:")
|
|
13 |
uploaded_file = st.file_uploader("Upload a CSV file from Hugging Face Hub:", type="CSV")
|
14 |
|
15 |
if uploaded_file is not None:
|
16 |
-
#
|
17 |
-
|
18 |
|
19 |
# Preprocess the CSV data
|
20 |
-
context = preprocess_csv(
|
21 |
|
22 |
# Display the uploaded CSV data as a table
|
23 |
-
st.dataframe(
|
24 |
|
25 |
else:
|
26 |
# Use default context (optional)
|
|
|
13 |
uploaded_file = st.file_uploader("Upload a CSV file from Hugging Face Hub:", type="CSV")
|
14 |
|
15 |
if uploaded_file is not None:
|
16 |
+
# Read the CSV data using pandas
|
17 |
+
df = pd.read_csv(uploaded_file)
|
18 |
|
19 |
# Preprocess the CSV data
|
20 |
+
context = preprocess_csv(df) # Assuming preprocess_csv can handle DataFrame input
|
21 |
|
22 |
# Display the uploaded CSV data as a table
|
23 |
+
st.dataframe(df)
|
24 |
|
25 |
else:
|
26 |
# Use default context (optional)
|