osbm commited on
Commit
d43a9e4
·
1 Parent(s): 860376b
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -1,17 +1,8 @@
1
  import os
2
-
3
- if not os.path.exists("data/"):
4
- os.makedirs("data/")
5
- # now curl -L -o data/human-segmentation-dataset.zip https://www.kaggle.com/api/v1/datasets/download/trainingdatapro/human-segmentation-dataset
6
- os.system("curl -L -o data/human-segmentation-dataset.zip https://www.kaggle.com/api/v1/datasets/download/trainingdatapro/human-segmentation-dataset")
7
- os.system("unzip data/human-segmentation-dataset.zip -d data/")
8
- os.system("rm data/human-segmentation-dataset.zip")
9
-
10
-
11
  import streamlit as st
12
  import pandas as pd
13
  import numpy as np
14
-
15
 
16
  voters = [
17
  "osman",
@@ -33,15 +24,16 @@ with st.form("login"):
33
  submitted = st.form_submit_button("Login")
34
 
35
 
36
- def get_one_from_queue(voter: str):
37
- # get an image for the voter or return False if no image is left
38
-
39
- df = pd.read_csv("data.csv")
40
 
41
- # select all the rows where the voters votes is not None
42
- df = df[df[voter].notnull()]
43
 
 
 
 
44
 
 
45
 
46
  if submitted:
47
  if not password == os.environ.get("app_password"):
@@ -66,4 +58,5 @@ if submitted:
66
  st.write("slideers", healthiness, fat_level, muscle_level)
67
  # push the data to the database
68
 
69
- st.write("Outside the form")
 
 
1
  import os
 
 
 
 
 
 
 
 
 
2
  import streamlit as st
3
  import pandas as pd
4
  import numpy as np
5
+ import huggingface_hub as hfh
6
 
7
  voters = [
8
  "osman",
 
24
  submitted = st.form_submit_button("Login")
25
 
26
 
27
+ def get_list_of_images():
28
+ all_files = hfh.list_files_info(repo_id = "aifred-smart-life-coach/capstone-images", repo_type = "dataset")
29
+ return all_files
 
30
 
 
 
31
 
32
+ def get_one_from_queue(voter: str):
33
+ # get an image for the voter or return False if no image is left
34
+ return None
35
 
36
+ st.write(get_list_of_images())
37
 
38
  if submitted:
39
  if not password == os.environ.get("app_password"):
 
58
  st.write("slideers", healthiness, fat_level, muscle_level)
59
  # push the data to the database
60
 
61
+ st.write("Outside the form")
62
+