Spaces:
Runtime error
Runtime error
initial commit
Browse files- .gitignore +1 -0
- app.py +18 -0
- requirements.txt +2 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
.venv/
|
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import subprocess
|
3 |
+
import pandas as pd
|
4 |
+
# import StringIO
|
5 |
+
from io import StringIO
|
6 |
+
|
7 |
+
|
8 |
+
st.title("Hello World")
|
9 |
+
st.write("This is a test")
|
10 |
+
output = subprocess.check_output("df -h", shell=True)
|
11 |
+
|
12 |
+
|
13 |
+
# make it a dataframe
|
14 |
+
df = pd.read_csv(StringIO(output.decode("utf-8")), sep="\s+")
|
15 |
+
df = df.drop(columns=["Mounted", "on"])
|
16 |
+
|
17 |
+
# show the dataframe
|
18 |
+
st.write(df)
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
pandas
|
2 |
+
streamlit
|