Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- excel_chat.py +1 -1
excel_chat.py
CHANGED
@@ -51,9 +51,9 @@ def chat_with_mistral(source_cols, dest_col, prompt, tdoc_name, excel_file, url)
|
|
51 |
|
52 |
|
53 |
def get_columns(file):
|
54 |
-
columns = list(df.columns)
|
55 |
if file is not None:
|
56 |
df = pd.read_excel(file)
|
|
|
57 |
return gr.update(choices=columns), gr.update(choices=columns), gr.update(choices=columns), gr.update(columns + [""]), df.head(5)
|
58 |
else:
|
59 |
return gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), pd.DataFrame()
|
|
|
51 |
|
52 |
|
53 |
def get_columns(file):
|
|
|
54 |
if file is not None:
|
55 |
df = pd.read_excel(file)
|
56 |
+
columns = list(df.columns)
|
57 |
return gr.update(choices=columns), gr.update(choices=columns), gr.update(choices=columns), gr.update(columns + [""]), df.head(5)
|
58 |
else:
|
59 |
return gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), gr.update(choices=[]), pd.DataFrame()
|