Spaces:
No application file
No application file
Download src/utils/ui_settings.py from sid-0313/rag-based-search: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/spaces/sid-0313/rag-based-search/resolve/main/src/utils/ui_settings.py
- Command line
-
hf download hf://spaces/sid-0313/rag-based-search/src/utils/ui_settings.py
-
curl -L -o ui_settings.py https://huggingface.co/spaces/sid-0313/rag-based-search/resolve/main/src/utils/ui_settings.py
379 Bytes
| import gradio as gr | |
| class UISettings: | |
| def toggle_sidebar(state): | |
| state = not state | |
| return gr.update(visible=state), state | |
| def feedback(data: gr.LikeData): | |
| if data.liked: | |
| print("You upvoted this response: " + data.value) | |
| else: | |
| print("You downvoted this response: " + data.value) |