Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
from pandasai import SmartDataframe
|
@@ -62,6 +63,9 @@ request = st.text_input(
|
|
62 |
if st.button("Analyze"):
|
63 |
if st.session_state['df'] is not None:
|
64 |
file = st.session_state['df'].chat(request)
|
65 |
-
|
|
|
|
|
|
|
66 |
else:
|
67 |
st.warning("Please select a conversation and load data first.")
|
|
|
1 |
+
import os
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
4 |
from pandasai import SmartDataframe
|
|
|
63 |
if st.button("Analyze"):
|
64 |
if st.session_state['df'] is not None:
|
65 |
file = st.session_state['df'].chat(request)
|
66 |
+
if os.path.exists(file):
|
67 |
+
st.image(file)
|
68 |
+
else:
|
69 |
+
st.info(file)
|
70 |
else:
|
71 |
st.warning("Please select a conversation and load data first.")
|