Aivis commited on
Commit
0c8e881
·
verified ·
1 Parent(s): 958a42d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -214,16 +214,16 @@ with gr.Blocks() as demo:
214
  content_dict = get_topic_content(topic_code)
215
  return gr.update(choices=list(content_dict.keys()), visible=True), content_dict, topic_code
216
 
217
- def update_reports(topic_content_name:str, content_dict:dict, topic_name:str='')-> Tuple[Dict[str, str], str, Any]:
218
  """
219
  Updates the UI dropdown menu with available report titles for a selected topic content,
220
  and returns the titles dictionary and the corresponding content code.
221
 
222
  Args:
223
- topic_content_name (str): The name of the selected topic content (e.g., "Darba samaksa (algas)"). Topic content you can get from `update_topic_content` (`content_dict` object).
224
- content_dict (dict): A dictionary mapping topic content names to their corresponding content codes. Obtained from `update_topic_content` (2nd returned object: `content_dict`).
225
  topic_name (str): The name of the selected topic. Possible topic names: 'Darbs', 'Iedzīvotāji', 'Informācijas tehnoloģijas', 'Izglītība, kultūra un zinātne', 'Nozares',\
226
- 'Sociālā aizsardzība un veselība', 'Tirdzniecība un pakalpojumi', 'Uzņēmējdarbība', 'Valsts un ekonomika', 'Vide'.
 
227
 
228
  Returns:
229
  tuple:
 
214
  content_dict = get_topic_content(topic_code)
215
  return gr.update(choices=list(content_dict.keys()), visible=True), content_dict, topic_code
216
 
217
+ def update_reports(topic_content_name:str, topic_name:str='', content_dict:dict = None)-> Tuple[Dict[str, str], str, Any]:
218
  """
219
  Updates the UI dropdown menu with available report titles for a selected topic content,
220
  and returns the titles dictionary and the corresponding content code.
221
 
222
  Args:
223
+ topic_content_name (str): The name of the selected topic content (e.g., "Darba samaksa (algas)"). Topic content names you can get from `update_topic_content` (`content_dict` object).
 
224
  topic_name (str): The name of the selected topic. Possible topic names: 'Darbs', 'Iedzīvotāji', 'Informācijas tehnoloģijas', 'Izglītība, kultūra un zinātne', 'Nozares',\
225
+ 'Sociālā aizsardzība un veselība', 'Tirdzniecība un pakalpojumi', 'Uzņēmējdarbība', 'Valsts un ekonomika', 'Vide'.
226
+ content_dict (dict): A dictionary mapping topic content names to their corresponding content codes. Obtained from `update_topic_content` (2nd returned object: `content_dict`).
227
 
228
  Returns:
229
  tuple: