兼容docker和整合包下FAQ的加载逻辑
This commit is contained in:
@@ -64,6 +64,7 @@ COPY templates ./templates
|
||||
COPY workflows ./workflows
|
||||
COPY resources ./resources
|
||||
COPY docs/images ./docs/images
|
||||
COPY docs/FAQ.md docs/FAQ_CN.md ./docs/
|
||||
|
||||
# Create output, data and temp directories
|
||||
RUN mkdir -p /app/output /app/data /app/temp
|
||||
|
||||
@@ -47,7 +47,7 @@ build:
|
||||
- "docs/zh/*" # Don't include Chinese docs
|
||||
- "docs/gallery/*" # Don't include gallery docs
|
||||
- "docs/stylesheets/*" # Don't include doc stylesheets
|
||||
- "docs/*.md" # Don't include doc markdown files
|
||||
# Note: FAQ.md and FAQ_CN.md are included for in-app FAQ feature
|
||||
- "test_*.py" # Don't include test files
|
||||
- ".venv"
|
||||
- "venv"
|
||||
|
||||
@@ -85,12 +85,16 @@ def render_faq_sidebar():
|
||||
|
||||
# Display FAQ content
|
||||
st.markdown(faq_content, unsafe_allow_html=True)
|
||||
else:
|
||||
# Show error message if FAQ cannot be loaded
|
||||
st.warning(tr('faq.load_error', fallback='Failed to load FAQ content'))
|
||||
|
||||
# Add a link to GitHub issues for more help
|
||||
st.markdown(
|
||||
f"💡 {tr('faq.more_help', fallback='Need more help?')} "
|
||||
f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues)"
|
||||
)
|
||||
# Add a link to GitHub issues for more help
|
||||
st.markdown(
|
||||
f"💡 {tr('faq.more_help', fallback='Need more help?')} "
|
||||
f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues)"
|
||||
)
|
||||
else:
|
||||
# If FAQ cannot be loaded, only show the GitHub link
|
||||
st.markdown(f"### 💡 {tr('faq.more_help', fallback='Need help?')}")
|
||||
st.markdown(
|
||||
f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues) | "
|
||||
f"[Documentation](https://aidc-ai.github.io/Pixelle-Video)"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user