mgokg commited on
Commit
98eaec6
·
verified ·
1 Parent(s): ea96f17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -28,6 +28,7 @@ if uploaded_file is not None:
28
  df1
29
  sdf = SmartDataframe(df1)
30
 
 
31
  prompt = st.text_area("Enter your prompt:")
32
  if st.button("Generate"):
33
 
@@ -37,9 +38,10 @@ if st.button("Generate"):
37
 
38
  bar = st.progress(0)
39
  #sdf = SmartDataframe(df1)
40
- #df
41
- #sdf.chat(prompt)
42
- st.write(sdf.chat(prompt))
 
43
  bar.progress(100)
44
 
45
  else:
@@ -50,7 +52,7 @@ if st.button("Generate"):
50
  #agent = Agent(df)
51
  #result = agent.chat("erstelle balkendiagramm")
52
  #st.write(result)
53
- sdf = SmartDataframe(df)
54
  #sdf.chat("draw chart")
55
  #pandas_ai = PandasAI(llm, verbose=True, save_charts=True)
56
  #st.write(sdf.chat("Plot a chart"))
 
28
  df1
29
  sdf = SmartDataframe(df1)
30
 
31
+ container=st.empty
32
  prompt = st.text_area("Enter your prompt:")
33
  if st.button("Generate"):
34
 
 
38
 
39
  bar = st.progress(0)
40
  #sdf = SmartDataframe(df1)
41
+ container.empty
42
+ container.write(sdf.chat(prompt))
43
+ container.write(st.image('./exports/charts/temp_chart.png',caption=None))
44
+ #st.write(sdf.chat(prompt))
45
  bar.progress(100)
46
 
47
  else:
 
52
  #agent = Agent(df)
53
  #result = agent.chat("erstelle balkendiagramm")
54
  #st.write(result)
55
+ #sdf = SmartDataframe(df)
56
  #sdf.chat("draw chart")
57
  #pandas_ai = PandasAI(llm, verbose=True, save_charts=True)
58
  #st.write(sdf.chat("Plot a chart"))