Spaces:
Sleeping
Sleeping
from gradio import Button, Textbox, Files | |
import logging | |
import logging.config | |
from config.constants import LOGGING_DICT_CONFIG | |
logging.config.dictConfig(LOGGING_DICT_CONFIG) | |
STREAM_LOGGER = logging.getLogger("StreamLogger") | |
FILE_LOGGER = logging.getLogger("FileLogger") | |
class EventsHandler: | |
def __init__(self) -> None: | |
... | |
def click_run_button(self, input_text: str): | |
STREAM_LOGGER.debug("click on run button") | |
files = Files( | |
value= [ | |
'/app/config/logging/app.log' | |
], | |
visible= True | |
) | |
input_text = Textbox( | |
value= input_text, | |
interactive= False | |
) | |
appr_btn, disappr_btn = Button(value= "✅", visible= True), Button(value= "❌", visible= True) | |
return [input_text, files, appr_btn, disappr_btn] | |
async def click_clear_button(self): | |
STREAM_LOGGER.debug("click on clear button") | |
input_text = Textbox(placeholder="Escriba la búsqueda aquí",label= "Búsqueda", value= "", interactive= True) | |
out_files = Files(interactive= False, file_count= "multiple", visible= False) | |
appr_btn, disappr_btn = Button(value= "✅", visible= False), Button(value= "❌", visible= False) | |
return [input_text, out_files, appr_btn, disappr_btn] | |
async def click_appr_button(self, input_text: str, out_files: list): | |
STREAM_LOGGER.debug("click on approve button") | |
... | |
async def click_disappr_button(self, input_text: str, out_files: list): | |
STREAM_LOGGER.debug("click on disapprove button") | |
... |