最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reveal.js - Shinylive doesn't render in Quarto revealjs presentation - Stack Overflow

programmeradmin1浏览0评论

I'm trying to use shinylive to show a shiny python example in a revealjs quarto presentation. Unfortunately, the shinylive output keeps rendering and doesn't show the output. Here is a reproducible example:

---
format: revealjs
server: shiny
filters:
    - shinylive
---

Python

```{shinylive-python}
#| standalone: true
#| components: [editor, viewer]

from shiny import *

app_ui = ui.page_fluid(
    ui.input_slider("n", "N", 0, 100, 40),
    ui.output_text_verbatim("txt"),
)

def server(input, output, session):
    @output
    @render.text
    def txt():
        return f"The value of n*2 is {input.n() * 2}"

app = App(app_ui, server)

```

Output:

It keeps rendering and not showing the output. I installed the quarto add quarto-ext/shinylive extension and used pip install shinylive --upgrade which is version 0.8.2. So I was wondering if anyone knows why this happens?

发布评论

评论列表(0)

  1. 暂无评论