使用 mesop 示例代码出现此错误。为什么?
import mesop as me
import mesop.labs as mel
@me.page(
security_policy=me.SecurityPolicy(
allowed_iframe_parents=["https://google.github.io"]
),
path="/text_to_text",
title="Text to Text Example",
)
def app():
mel.text_to_text(
upper_case_stream,
title="Text to Text Example",
transform_mode="replace"
)
def upper_case_stream(s: str):
return "Echo: " + s
我猜测服务器运行在 http://localhost:32123 上它应该在的位置 http://localhost:32123/text_to_text。 我相信这部分: 路径=“/text_to_text”,
就是添加/text_to_text来完成链接:http://localhost:32123。但错误发生了。
你有没有搞清楚这件事的真相?将路径设置为 / 可以使其正常工作,但这并不是所有示例所显示的。