Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,6 @@ from datasets import load_dataset
|
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
|
| 5 |
-
|
| 6 |
@st.cache()
|
| 7 |
def get_repo_names():
|
| 8 |
list_of_repo_names = ["lvwerra/test", "lvwerra/test2", "numpy/numpy"]
|
|
@@ -16,6 +15,12 @@ username = st.text_input("GitHub Username:")
|
|
| 16 |
|
| 17 |
if st.button("Check!"):
|
| 18 |
list_of_repos = [repo_name for repo_name in repo_names if repo_name.split("/")[0]==username]
|
| 19 |
-
st.text("## Repositories in The Stack:")
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
|
|
|
|
| 5 |
@st.cache()
|
| 6 |
def get_repo_names():
|
| 7 |
list_of_repo_names = ["lvwerra/test", "lvwerra/test2", "numpy/numpy"]
|
|
|
|
| 15 |
|
| 16 |
if st.button("Check!"):
|
| 17 |
list_of_repos = [repo_name for repo_name in repo_names if repo_name.split("/")[0]==username]
|
|
|
|
| 18 |
|
| 19 |
+
if len(list_of_repos)==0:
|
| 20 |
+
st.markdown("**No repository found in The Stack**")
|
| 21 |
+
else:
|
| 22 |
+
if len(list_of_repos)==1:
|
| 23 |
+
st.markdown("**1 repository found in The Stack**")
|
| 24 |
+
else:
|
| 25 |
+
st.markdown(f"**{len(list_of_repos)} repositories found in The Stack**")
|
| 26 |
+
st.text("\n".join(list_of_repos))
|