Spaces:
Build error
Build error
Commit
·
382ab41
1
Parent(s):
35b76d1
Update ui_utils.py
Browse files- ui_utils.py +8 -7
ui_utils.py
CHANGED
@@ -49,14 +49,15 @@ def csv_upload_and_ingestion(client, selected_class):
|
|
49 |
def display_query_input():
|
50 |
question = st.text_input("Enter your question:", key="query_input")
|
51 |
|
52 |
-
#
|
53 |
-
if
|
54 |
if st.button("Submit Query"):
|
55 |
-
#
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
60 |
|
61 |
|
62 |
def query_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model):
|
|
|
49 |
def display_query_input():
|
50 |
question = st.text_input("Enter your question:", key="query_input")
|
51 |
|
52 |
+
# Display the "Submit Query" button if CSV has been uploaded
|
53 |
+
if st.session_state.get("csv_uploaded", False):
|
54 |
if st.button("Submit Query"):
|
55 |
+
if question: # Check if the question input is not empty
|
56 |
+
# Call function to query TAPAS with selected data and entered question
|
57 |
+
query_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model)
|
58 |
+
else:
|
59 |
+
st.warning("Please provide a text query in the 'Enter your question:' input box to proceed.")
|
60 |
+
|
61 |
|
62 |
|
63 |
def query_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model):
|