Download app.py from TextGrad/demo: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/spaces/TextGrad/demo/resolve/main/app.py
- Command line
-
hf download hf://spaces/TextGrad/demo/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TextGrad/demo/resolve/main/app.py
626 Bytes
| import home | |
| import streamlit as st | |
| st.set_page_config(layout="wide") | |
| st.sidebar.image('assets/img/textgrad_logo_1x.png', width=200) | |
| st.sidebar.title("TextGrad Playground") | |
| st.sidebar.markdown("## Menu") | |
| PAGES = { | |
| "π Home": home, | |
| } | |
| page = st.sidebar.radio("", list(PAGES.keys())) | |
| st.sidebar.markdown("## Links") | |
| st.sidebar.markdown(""" | |
| π [Paper](https://arxiv.org/abs/2406.07496) | |
| π¨βπ» [Code](https://github.com/zou-group/textgrad) | |
| βοΈ [API documentation](https://textgrad.readthedocs.io/en/latest/index.html)""") | |
| PAGES[page].app() |