Update app.py
Browse files
app.py
CHANGED
@@ -25,12 +25,17 @@ with col2:
|
|
25 |
if selected_source == sources[0]:
|
26 |
try:
|
27 |
df = pd.read_parquet("hf://datasets/cfahlgren1/hub-stats/posts.parquet")
|
28 |
-
except Exception as exp:
|
29 |
-
st.error(f'ERROR >> pd.read_parquet("hf://datasets/cfahlgren1/hub-stats/posts.parquet")\n{exp}', icon="🚨")
|
30 |
ds = load_dataset("cfahlgren1/hub-stats", "posts")
|
31 |
df = pd.DataFrame(ds['train']).info()
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
if selected_source == sources[1]:
|
36 |
df = pd.read_json("hf://datasets/maxiw/hf-posts/posts.jsonl", lines=True)
|
|
|
25 |
if selected_source == sources[0]:
|
26 |
try:
|
27 |
df = pd.read_parquet("hf://datasets/cfahlgren1/hub-stats/posts.parquet")
|
|
|
|
|
28 |
ds = load_dataset("cfahlgren1/hub-stats", "posts")
|
29 |
df = pd.DataFrame(ds['train']).info()
|
30 |
+
df["Name"] = df.fullname
|
31 |
+
df["username"] = df.name
|
32 |
+
except Exception as exp:
|
33 |
+
st.error(f'ERROR >> pd.read_parquet("hf://datasets/cfahlgren1/hub-stats/posts.parquet")\n{exp}', icon="🚨")
|
34 |
+
selected_source == sources[1]
|
35 |
+
st.info(f'This can be solved by "Space Restart"\nSwitching Sources for now...\nNew Source: {selected_source}', icon="ℹ️")
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
|
40 |
if selected_source == sources[1]:
|
41 |
df = pd.read_json("hf://datasets/maxiw/hf-posts/posts.jsonl", lines=True)
|