Spaces:
Build error
Build error
Commit ·
382ab41
1
Parent(s): 35b76d1
Update ui_utils.py
Browse files48 unmodified lines495051525354555657585960616248 unmodified linesdef display_query_input():question = st.text_input("Enter your question:", key="query_input")# Check if the question input is not emptyif question:if st.button("Submit Query"):# Call function to query TAPAS with selected data and entered questionquery_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model)elif st.session_state.get("csv_uploaded", False): # Check if CSV has been uploadedif st.button("Submit Query"):st.warning("Please provide a text query in the 'Enter your question:' input box to proceed.")def query_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model):48 unmodified lines49505152535455565758596061626348 unmodified linesdef display_query_input():question = st.text_input("Enter your question:", key="query_input")# Display the "Submit Query" button if CSV has been uploadedif st.session_state.get("csv_uploaded", False):if st.button("Submit Query"):if question: # Check if the question input is not empty# Call function to query TAPAS with selected data and entered questionquery_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model)else:st.warning("Please provide a text query in the 'Enter your question:' input box to proceed.")def query_tapas_with_weaviate_data(client, selected_class, question, tokenizer, model):
ui_utils.py+8-7