MaksG commited on
Commit
853deb7
1 Parent(s): 724556d

Update excel_chat.py

Browse files
Files changed (1) hide show
  1. excel_chat.py +3 -2
excel_chat.py CHANGED
@@ -97,6 +97,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
97
  def get_columns(file,progress=gr.Progress()):
98
  if file is not None:
99
  df = pd.read_excel(file)
100
- return gr.update(choices=list(df.columns)), gr.update(choices=list(df.columns)), df.head(5)
 
101
  else:
102
- return gr.update(choices=[]), gr.update(choices=[]), pd.DataFrame()
 
97
  def get_columns(file,progress=gr.Progress()):
98
  if file is not None:
99
  df = pd.read_excel(file)
100
+ columns = list(df.columns)
101
+ return gr.update(choices=columns), gr.update(choices=columns), gr.update(choices=columns), gr.update(choices=columns + [""]), gr.update(choices=columns + ['[ALL]']), df.head(5)
102
  else:
103
+ return gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), pd.DataFrame()