Spaces:
Build error
Build error
Commit ·
a17d0ff
1
Parent(s): 6b58ffb
Update app.py
Browse files166 unmodified lines1671681691701711721733 unmodified lines177178179179180181182183166 unmodified linescsv_file = st.file_uploader("Upload a CSV file", type=["csv"])
# Display the schema if an existing class is selectedclass_schema = None # Initialize class_schema to Noneif selected_class != "New Class": st.write(f"Schema for {selected_class}:") class_schema = get_class_schema(selected_class)3 unmodified lines st.table(schema_df[["name", "dataType"]]) # Display only the name and dataType columns
# Before ingesting data into Weaviate, check if CSV columns match the class schemaif csv_file is not None:if csv_file is not None and class_schema: # Ensure class_schema is not None data = csv_file.read().decode("utf-8") dataframe = pd.read_csv(StringIO(data)) app.py+2-1