Spaces:
Build error
Build error
Commit ·
aa88d2a
1
Parent(s): 58edde1
Update app.py
Browse files52 unmodified lines535455565758593 unmodified lines6364656667686952 unmodified lines# Get existing classes from Weaviateexisting_classes = [cls["class"] for cls in client.schema.get()["classes"]]class_options = existing_classes + ["New Class"]selected_class = st.selectbox("Select a class or create a new one:", class_options)if selected_class == "New Class":class_name = st.text_input("Enter the new class name:")3 unmodified linesclass_description = "" # We can fetch the description from Weaviate if needed# Upload CSV datacsv_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 None52 unmodified lines535455565758593 unmodified lines6364656667686952 unmodified lines# Get existing classes from Weaviateexisting_classes = [cls["class"] for cls in client.schema.get()["classes"]]class_options = existing_classes + ["New Class"]selected_class = st.selectbox("Select a class or create a new one:", class_options, key="class_selector")if selected_class == "New Class":class_name = st.text_input("Enter the new class name:")3 unmodified linesclass_description = "" # We can fetch the description from Weaviate if needed# Upload CSV datacsv_file = st.file_uploader("Upload a CSV file", type=["csv"], key="csv_uploader")# Display the schema if an existing class is selectedclass_schema = None # Initialize class_schema to None
app.py+2-2