Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- excel_chat.py +2 -2
excel_chat.py
CHANGED
@@ -94,7 +94,7 @@ def filter_df(df, column_name, keywords):
|
|
94 |
return filtered_df
|
95 |
|
96 |
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
97 |
-
update_json(user, prompt, keywords)
|
98 |
print(f'xlsxfile = {excel_file}')
|
99 |
df = pd.read_excel(excel_file)
|
100 |
df[dest_col] = ""
|
@@ -116,7 +116,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
|
|
116 |
df.at[index, dest_col] = llm_answer
|
117 |
|
118 |
df.to_excel(file_name, index=False)
|
119 |
-
return file_name, df.head(5)
|
120 |
|
121 |
|
122 |
def get_columns(file,progress=gr.Progress()):
|
|
|
94 |
return filtered_df
|
95 |
|
96 |
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
97 |
+
new_prompts, new_keywords = update_json(user, prompt, keywords)
|
98 |
print(f'xlsxfile = {excel_file}')
|
99 |
df = pd.read_excel(excel_file)
|
100 |
df[dest_col] = ""
|
|
|
116 |
df.at[index, dest_col] = llm_answer
|
117 |
|
118 |
df.to_excel(file_name, index=False)
|
119 |
+
return file_name, df.head(5), new_prompts, new_keywords
|
120 |
|
121 |
|
122 |
def get_columns(file,progress=gr.Progress()):
|