Spaces:
Sleeping
Sleeping
pup play
Browse files- Dockerfile +2 -2
- main.py +8 -8
- pup +1 -1
Dockerfile
CHANGED
@@ -36,5 +36,5 @@ COPY --chown=user main.py .
|
|
36 |
|
37 |
EXPOSE 7860
|
38 |
|
39 |
-
# CMD ["
|
40 |
-
CMD ["
|
|
|
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", "
|
|
|
|
|
|
|
|
|
|
|
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="
|
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="
|
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
|