eagle0504 commited on
Commit
2b33d6d
·
verified ·
1 Parent(s): 2e8d93a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -73,7 +73,6 @@ if clear_button:
73
  counter_placeholder.write(f"Next item ...")
74
 
75
  # Insert a file uploader that accepts multiple files at a time
76
- col1, col2 = st.columns([3, 1])
77
  if uploaded_file is not None:
78
  # Success message
79
  st.sidebar.success("File uploaded successfully.")
@@ -82,15 +81,14 @@ if uploaded_file is not None:
82
  df = pd.read_csv(uploaded_file)
83
 
84
  # Col 1:
85
- with col1:
86
- # Generate the HTML using Pygwalker
87
- pyg_html = pyg.walk(df, return_html=True, height=1000)
88
-
89
- # Embed the HTML into the Streamlit app
90
- components.html(pyg_html, height=700, scrolling=True)
91
 
92
  # Col 2:
93
- with col2:
94
  # Instantiate a LLM
95
  OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
96
  llm = OpenAI(api_token=OPENAI_API_KEY)
 
73
  counter_placeholder.write(f"Next item ...")
74
 
75
  # Insert a file uploader that accepts multiple files at a time
 
76
  if uploaded_file is not None:
77
  # Success message
78
  st.sidebar.success("File uploaded successfully.")
 
81
  df = pd.read_csv(uploaded_file)
82
 
83
  # Col 1:
84
+ # Generate the HTML using Pygwalker
85
+ pyg_html = pyg.walk(df, return_html=True, height=1400)
86
+
87
+ # Embed the HTML into the Streamlit app
88
+ components.html(pyg_html, height=900, scrolling=True)
 
89
 
90
  # Col 2:
91
+ with st.sidebar:
92
  # Instantiate a LLM
93
  OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
94
  llm = OpenAI(api_token=OPENAI_API_KEY)