Spaces:
Runtime error
Runtime error
Commit
·
99464ab
1
Parent(s):
5a32169
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from dotenv import load_dotenv
|
3 |
+
from utils import query_agent
|
4 |
+
|
5 |
+
load_dotenv()
|
6 |
+
|
7 |
+
|
8 |
+
st.title("Let's do some analysis on your CSV")
|
9 |
+
st.header("Please upload your CSV file here:")
|
10 |
+
|
11 |
+
# Capture the CSV file
|
12 |
+
data = st.file_uploader("Upload CSV file",type="csv")
|
13 |
+
|
14 |
+
query = st.text_area("Enter your query")
|
15 |
+
button = st.button("Generate Response")
|
16 |
+
|
17 |
+
if button:
|
18 |
+
# Get Response
|
19 |
+
answer = query_agent(data,query)
|
20 |
+
st.write(answer)
|