Spaces:
Build error
Build error
Commit
·
aa88d2a
1
Parent(s):
58edde1
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ st.title("TAPAS Table Question Answering with Weaviate")
|
|
53 |
# Get existing classes from Weaviate
|
54 |
existing_classes = [cls["class"] for cls in client.schema.get()["classes"]]
|
55 |
class_options = existing_classes + ["New Class"]
|
56 |
-
selected_class = st.selectbox("Select a class or create a new one:", class_options)
|
57 |
|
58 |
if selected_class == "New Class":
|
59 |
class_name = st.text_input("Enter the new class name:")
|
@@ -63,7 +63,7 @@ else:
|
|
63 |
class_description = "" # We can fetch the description from Weaviate if needed
|
64 |
|
65 |
# Upload CSV data
|
66 |
-
csv_file = st.file_uploader("Upload a CSV file", type=["csv"])
|
67 |
|
68 |
# Display the schema if an existing class is selected
|
69 |
class_schema = None # Initialize class_schema to None
|
|
|
53 |
# Get existing classes from Weaviate
|
54 |
existing_classes = [cls["class"] for cls in client.schema.get()["classes"]]
|
55 |
class_options = existing_classes + ["New Class"]
|
56 |
+
selected_class = st.selectbox("Select a class or create a new one:", class_options, key="class_selector")
|
57 |
|
58 |
if selected_class == "New Class":
|
59 |
class_name = st.text_input("Enter the new class name:")
|
|
|
63 |
class_description = "" # We can fetch the description from Weaviate if needed
|
64 |
|
65 |
# Upload CSV data
|
66 |
+
csv_file = st.file_uploader("Upload a CSV file", type=["csv"], key="csv_uploader")
|
67 |
|
68 |
# Display the schema if an existing class is selected
|
69 |
class_schema = None # Initialize class_schema to None
|