jrosell commited on
Commit
ac9851b
·
1 Parent(s): de261c4

ambhtmx_app to ambhtmx

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -1
  2. README.md +3 -3
  3. app.R +6 -9
Dockerfile CHANGED
@@ -41,7 +41,9 @@ RUN install2.r --error -s --deps TRUE htmltools tibble dplyr purrr rlang glue th
41
  RUN Rscript -e "install.packages('b64', repos = c('https://extendr.r-universe.dev', getOption('repos')))"
42
  RUN Rscript -e "install.packages('uwu', repos = c('https://josiahparry.r-universe.dev', getOption('repos')))"
43
  RUN --mount=type=secret,id=GITHUB_PAT GITHUB_PAT=$(cat /run/secrets/GITHUB_PAT) \
44
- installGithub.r jrosell/ambhtmx devOpifex/ambiorix devOpifex/scilis devOpifex/signaculum
 
 
45
 
46
  # Prepare the user
47
  ENV HOME=/workspace \
 
41
  RUN Rscript -e "install.packages('b64', repos = c('https://extendr.r-universe.dev', getOption('repos')))"
42
  RUN Rscript -e "install.packages('uwu', repos = c('https://josiahparry.r-universe.dev', getOption('repos')))"
43
  RUN --mount=type=secret,id=GITHUB_PAT GITHUB_PAT=$(cat /run/secrets/GITHUB_PAT) \
44
+ installGithub.r devOpifex/ambiorix devOpifex/scilis devOpifex/signaculum
45
+ RUN --mount=type=secret,id=GITHUB_PAT GITHUB_PAT=$(cat /run/secrets/GITHUB_PAT) \
46
+ installGithub.r jrosell/ambhtmx
47
 
48
  # Prepare the user
49
  ENV HOME=/workspace \
README.md CHANGED
@@ -42,10 +42,9 @@ For example, you can adapt this for your gh and hf repos:
42
  git init
43
  git add -A
44
  git commit -m "My changes"
45
- git remote add origin [email protected]:jrosell/ambhmtx.card3d.git
46
- git remote add gh [email protected]:jrosell/ambhmtx.card3d.git
47
  git remote add hf [email protected]:spaces/jrosell/ambhtmx.card3d
48
- git remote set-url --add --push origin [email protected]:jrosell/ambhtmx.card3d.git
49
  git push --set-upstream gh main
50
  git push --set-upstream hf main
51
  ```
@@ -78,3 +77,4 @@ docker build -f Dockerfile --no-cache --progress=plain -t ambhtmx-card3d-image
78
  ```
79
 
80
  Check the [known issues](https://github.com/jrosell/ambhtmx/issues), and if you have another issue? Please, [let me know](https://github.com/jrosell/ambhtmx/issues).
 
 
42
  git init
43
  git add -A
44
  git commit -m "My changes"
45
+ git remote add origin [email protected]:jrosell/ambhtmx.card3d.git
46
+ git remote add gh [email protected]:jrosell/ambhtmx.card3d.git
47
  git remote add hf [email protected]:spaces/jrosell/ambhtmx.card3d
 
48
  git push --set-upstream gh main
49
  git push --set-upstream hf main
50
  ```
 
77
  ```
78
 
79
  Check the [known issues](https://github.com/jrosell/ambhtmx/issues), and if you have another issue? Please, [let me know](https://github.com/jrosell/ambhtmx/issues).
80
+
app.R CHANGED
@@ -4,8 +4,7 @@ library(ambhtmx)
4
 
5
  card_3d_demo <- \() {
6
  card <- "card"
7
- tryCatch(
8
- expr = {
9
  # Original python code credit: https://fastht.ml/
10
  # Design credit: https://codepen.io/markmiro/pen/wbqMPa
11
  bgurl <- "https://ucarecdn.com/35a0e8a7-fcc5-48af-8a3f-70bb96ff5c48/-/preview/750x1000/"
@@ -25,10 +24,8 @@ card_3d_demo <- \() {
25
  div(card, style = card_styles)
26
  }
27
 
28
- app <- ambhtmx_app(host = "0.0.0.0", port = "7860", protocol ="http")$app
29
-
30
- app$get("/", \(req, res) {
31
- card_3d_demo() |> send_page(res)
32
- })
33
-
34
- app$start()
 
4
 
5
  card_3d_demo <- \() {
6
  card <- "card"
7
+ tryCatch({
 
8
  # Original python code credit: https://fastht.ml/
9
  # Design credit: https://codepen.io/markmiro/pen/wbqMPa
10
  bgurl <- "https://ucarecdn.com/35a0e8a7-fcc5-48af-8a3f-70bb96ff5c48/-/preview/750x1000/"
 
24
  div(card, style = card_styles)
25
  }
26
 
27
+ ambhtmx(host = "0.0.0.0", port = "7860", protocol ="http")$app$
28
+ get("/", \(req, res) {
29
+ card_3d_demo() |> send_page(res)
30
+ })$
31
+ start()