Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
components.html(pyg_html, height=700, scrolling=True)
|
| 91 |
|
| 92 |
# Col 2:
|
| 93 |
-
with
|
| 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)
|