rag-based-search / src /utils /ui_settings.py
sid-0313's picture
Create ui_settings.py
ddf4814 verified
import gradio as gr
class UISettings:
@staticmethod
def toggle_sidebar(state):
state = not state
return gr.update(visible=state), state
@staticmethod
def feedback(data: gr.LikeData):
if data.liked:
print("You upvoted this response: " + data.value)
else:
print("You downvoted this response: " + data.value)