Spaces:
Sleeping
Sleeping
how about now
Browse files
app.py
CHANGED
|
@@ -29,16 +29,17 @@ def get_list_of_images():
|
|
| 29 |
# return fs.ls("datasets/aifred-smart-life-coach/capstone-images", detail=False, refresh=True)
|
| 30 |
api = hfh.HfApi()
|
| 31 |
files = api.list_repo_tree(repo_id="aifred-smart-life-coach/capstone-images", repo_type="dataset", recursive=True)
|
| 32 |
-
files =
|
| 33 |
-
print(type(files[1]))
|
| 34 |
return files
|
| 35 |
|
| 36 |
|
| 37 |
def get_one_from_queue(voter: str):
|
| 38 |
# get an image for the voter or return False if no image is left
|
| 39 |
return None
|
| 40 |
-
|
| 41 |
-
st.write(
|
|
|
|
| 42 |
|
| 43 |
if submitted:
|
| 44 |
if not password == os.environ.get("app_password"):
|
|
|
|
| 29 |
# return fs.ls("datasets/aifred-smart-life-coach/capstone-images", detail=False, refresh=True)
|
| 30 |
api = hfh.HfApi()
|
| 31 |
files = api.list_repo_tree(repo_id="aifred-smart-life-coach/capstone-images", repo_type="dataset", recursive=True)
|
| 32 |
+
files = [file.path for file in files]
|
| 33 |
+
print(type(files[1].path))
|
| 34 |
return files
|
| 35 |
|
| 36 |
|
| 37 |
def get_one_from_queue(voter: str):
|
| 38 |
# get an image for the voter or return False if no image is left
|
| 39 |
return None
|
| 40 |
+
result = get_list_of_images()
|
| 41 |
+
st.write(result)
|
| 42 |
+
print(result)
|
| 43 |
|
| 44 |
if submitted:
|
| 45 |
if not password == os.environ.get("app_password"):
|