pup-py commited on
Commit
f81d12e
1 Parent(s): d27638a
Files changed (3) hide show
  1. Dockerfile +2 -2
  2. main.py +8 -8
  3. pup +1 -1
Dockerfile CHANGED
@@ -36,5 +36,5 @@ COPY --chown=user main.py .
36
 
37
  EXPOSE 7860
38
 
39
- # CMD ["pixi", "run", "python", "-m", "http.server", "7860", "--directory", "."]
40
- CMD ["appenv/.venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
36
 
37
  EXPOSE 7860
38
 
39
+ # CMD ["appenv/.venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
40
+ CMD ["pup", "play"]
main.py CHANGED
@@ -37,7 +37,12 @@ def files_in_folder(path: str):
37
  )
38
  for f in path_glob
39
  ],
40
- columns=["path", "size", "mtime", "folder"],
 
 
 
 
 
41
  )
42
 
43
  res.loc[-1] = [
@@ -48,16 +53,11 @@ def files_in_folder(path: str):
48
  ]
49
  res.sort_values(["folder", "path"], ascending=[False, True], inplace=True)
50
 
51
- res["path"] = res.apply(
52
- lambda x: f"<a href=/files/{path}{x.path}{'/' if x.folder else ''}>{x.path}</a>",
53
- axis=1,
54
- )
55
-
56
  table = to_html_datatable(
57
- df=res.drop(columns="folder"),
58
  classes="display nowrap compact",
59
  showIndex=False,
60
- paging=False
61
  )
62
 
63
  return f"""
 
37
  )
38
  for f in path_glob
39
  ],
40
+ columns=["path", "size", "mtime", "is_dir"],
41
+ )
42
+
43
+ res["path"] = res.apply(
44
+ lambda x: f"<a href=/files/{path}{x.path}{'/' if x.folder else ''}>{x.path}</a>",
45
+ axis=1,
46
  )
47
 
48
  res.loc[-1] = [
 
53
  ]
54
  res.sort_values(["folder", "path"], ascending=[False, True], inplace=True)
55
 
 
 
 
 
 
56
  table = to_html_datatable(
57
+ df=res.drop(columns="is_dir"),
58
  classes="display nowrap compact",
59
  showIndex=False,
60
+ paging=False,
61
  )
62
 
63
  return f"""
pup CHANGED
@@ -7,7 +7,7 @@ VERSION="pup v0 @ Apr 2 2024" # for Debian
7
  ####################
8
 
9
  LOG=.woof.log
10
- PIXI_DEFAULT_TASK="jupyter notebook --ip=0.0.0.0 --port=8880"
11
  SYMLINK_ON_PATH=$HOME/.local/bin/pup
12
  USAGE_MAIN="\n
13
  \e[1m\e[4mUsage\e[0m: (each subcommand shows more help)\n
 
7
  ####################
8
 
9
  LOG=.woof.log
10
+ PIXI_DEFAULT_TASK="appenv/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 7860"
11
  SYMLINK_ON_PATH=$HOME/.local/bin/pup
12
  USAGE_MAIN="\n
13
  \e[1m\e[4mUsage\e[0m: (each subcommand shows more help)\n