Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- excel_chat.py +2 -2
excel_chat.py
CHANGED
@@ -85,7 +85,7 @@ def filter_df(df, column_name, keywords):
|
|
85 |
filtered_df = df
|
86 |
return filtered_df
|
87 |
|
88 |
-
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user
|
89 |
new_prompts, new_keywords, new_user, conf_file_path = update_json(user, prompt, keywords)
|
90 |
print(f'xlsxfile = {excel_file}')
|
91 |
df = pd.read_excel(excel_file)
|
@@ -107,7 +107,7 @@ def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col
|
|
107 |
llm_answer = ask_llm(prompt[0], concatenated_content, client, user)
|
108 |
print(f"{index+1}/{len(df)}\nQUERY:\n{prompt[0]}\nCONTENT:\n{concatenated_content[:200]}...\n\nANSWER:\n{llm_answer}")
|
109 |
df.at[index, dest_col] = llm_answer
|
110 |
-
progress((index+1)/len(df),desc=f'Request {index+1}/{len(df)}')
|
111 |
|
112 |
df.to_excel(file_name, index=False)
|
113 |
|
|
|
85 |
filtered_df = df
|
86 |
return filtered_df
|
87 |
|
88 |
+
def chat_with_mistral(source_cols, dest_col, prompt, excel_file, url, search_col, keywords, client, user):
|
89 |
new_prompts, new_keywords, new_user, conf_file_path = update_json(user, prompt, keywords)
|
90 |
print(f'xlsxfile = {excel_file}')
|
91 |
df = pd.read_excel(excel_file)
|
|
|
107 |
llm_answer = ask_llm(prompt[0], concatenated_content, client, user)
|
108 |
print(f"{index+1}/{len(df)}\nQUERY:\n{prompt[0]}\nCONTENT:\n{concatenated_content[:200]}...\n\nANSWER:\n{llm_answer}")
|
109 |
df.at[index, dest_col] = llm_answer
|
110 |
+
# progress((index+1)/len(df),desc=f'Request {index+1}/{len(df)}')
|
111 |
|
112 |
df.to_excel(file_name, index=False)
|
113 |
|