Spaces:
Runtime error
Runtime error
Download frontend/components/display.py from HemanthSai7/StudybotAPI: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/spaces/HemanthSai7/StudybotAPI/resolve/main/frontend/components/display.py
- Command line
-
hf download hf://spaces/HemanthSai7/StudybotAPI/frontend/components/display.py
-
curl -L -o display.py https://huggingface.co/spaces/HemanthSai7/StudybotAPI/resolve/main/frontend/components/display.py
287 Bytes
| import streamlit as st | |
| def display_source_document(source_document: list): | |
| for i,source in enumerate(source_document): | |
| st.markdown(f"""{i+1}. ##### Source content | |
| - {source["page_content"]} | |
| - Page number: {source["metadata"]["page"]} | |
| """ | |
| ) | |