Spaces:
Runtime error
Runtime error
Commit ·
1e80cbc
1
Parent(s): e6d0cad
removing logger
Browse filesFiles changed (5)
14 unmodified lines1516171819202114 unmodified lines# show the sidebar elements and get the objectslanguages, details, max_duration, count, button_clicked = set_sidebar_layout()logger.info("Languages: %s, Details: %s, Max Duration: %s, Count: %s, Button Clicked: %s", languages, details, max_duration, count, button_clicked)# when the button gets clicked call the movie search functionif button_clicked:14 unmodified lines15161718192014 unmodified lines# show the sidebar elements and get the objectslanguages, details, max_duration, count, button_clicked = set_sidebar_layout()# when the button gets clicked call the movie search functionif button_clicked:
26 unmodified lines2728293031323326 unmodified linesmovie_list = process_response(result)if movie_list:breaklogger.info(f"Did not work for {result}")attempts -= 1display_result(movie_list)26 unmodified lines27282930313226 unmodified linesmovie_list = process_response(result)if movie_list:breakattempts -= 1display_result(movie_list)
4 unmodified lines56789101126 unmodified lines3839404142434445464 unmodified linesfrom config.config import REGEX_PATTERNfrom libs.util import remove_special_charactersimport re# Get the logger from the main scriptdef get_prompt(languages, details, max_duration, count):"""26 unmodified linesresponse = response.replace('\n', ' ')movies = re.findall(REGEX_PATTERN, response)logger.info(f"Response {response}")logger.info(f"Movies Returned {len(movies)}")logger.info(movies)if len(movies) == 0:return Nonemovies_list = []4 unmodified lines567891026 unmodified lines373839404142434 unmodified linesfrom config.config import REGEX_PATTERNfrom libs.util import remove_special_charactersimport redef get_prompt(languages, details, max_duration, count):"""26 unmodified linesresponse = response.replace('\n', ' ')movies = re.findall(REGEX_PATTERN, response)if len(movies) == 0:return Nonemovies_list = []
10 unmodified lines1112131415161710 unmodified lines:return: A tuple containing the values of the user inputs and the state of the submit button."""logger.info("Setting sidebar")with st.sidebar:st.title("Movie Finder")10 unmodified lines11121314151610 unmodified lines:return: A tuple containing the values of the user inputs and the state of the submit button."""with st.sidebar:st.title("Movie Finder")
13 unmodified lines14151617181913 unmodified lines:param query: a string containing search query.:return: response from the model'''logger.info(query)response = model.generate_content(query)return response13 unmodified lines141516171813 unmodified lines:param query: a string containing search query.:return: response from the model'''response = model.generate_content(query)return response
app.py-1
libs/backend.py-1
libs/format.py+1-4
libs/frontend.py-1
libs/query.py-1