Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- excel_chat.py +2 -2
excel_chat.py
CHANGED
@@ -84,7 +84,7 @@ def filter_df(df, column_name, keywords):
|
|
84 |
return filtered_df
|
85 |
|
86 |
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
87 |
-
new_prompts, new_keywords = update_json(user, prompt, keywords)
|
88 |
print(f'xlsxfile = {excel_file}')
|
89 |
df = pd.read_excel(excel_file)
|
90 |
df[dest_col] = ""
|
@@ -106,7 +106,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
|
|
106 |
df.at[index, dest_col] = llm_answer
|
107 |
|
108 |
df.to_excel(file_name, index=False)
|
109 |
-
return file_name, df.head(5), new_prompts, new_keywords
|
110 |
|
111 |
|
112 |
def get_columns(file,progress=gr.Progress()):
|
|
|
84 |
return filtered_df
|
85 |
|
86 |
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
87 |
+
new_prompts, new_keywords, new_user = update_json(user, prompt, keywords)
|
88 |
print(f'xlsxfile = {excel_file}')
|
89 |
df = pd.read_excel(excel_file)
|
90 |
df[dest_col] = ""
|
|
|
106 |
df.at[index, dest_col] = llm_answer
|
107 |
|
108 |
df.to_excel(file_name, index=False)
|
109 |
+
return file_name, df.head(5), new_prompts, new_keywords, new_user
|
110 |
|
111 |
|
112 |
def get_columns(file,progress=gr.Progress()):
|