Sakil commited on
Commit
52fa9a3
·
verified ·
1 Parent(s): 162f56d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -10,6 +10,12 @@ logging.basicConfig(level=logging.INFO)
10
  def main():
11
  st.title('CSV Data Query Tool')
12
 
 
 
 
 
 
 
13
  # Upload CSV file
14
  uploaded_file = st.file_uploader("Upload CSV file", type=['csv'])
15
  if uploaded_file is not None:
@@ -24,12 +30,7 @@ def main():
24
  query_engine = PandasQueryEngine(df=df, llm=llm, verbose=True)
25
 
26
  # Input user question
27
- question = st.text_input("Ask a question about the data:", key="question")
28
-
29
- # Clear input field for question
30
- if st.button("Clear Question"):
31
- question = ""
32
-
33
  if st.button("Submit"):
34
  if question:
35
  response = query_engine.query(question)
 
10
  def main():
11
  st.title('CSV Data Query Tool')
12
 
13
+ # Description
14
+ st.write("""
15
+ This app helps you query tabular data using natural language.
16
+ Upload a CSV file, enter your ANTHROPIC_API_KEY, ask a question about the data, and get a response!
17
+ """)
18
+
19
  # Upload CSV file
20
  uploaded_file = st.file_uploader("Upload CSV file", type=['csv'])
21
  if uploaded_file is not None:
 
30
  query_engine = PandasQueryEngine(df=df, llm=llm, verbose=True)
31
 
32
  # Input user question
33
+ question = st.text_input("Ask a question about the data:")
 
 
 
 
 
34
  if st.button("Submit"):
35
  if question:
36
  response = query_engine.query(question)