HFAgentsCourse / Utils /save_file.py
Alessio-Chiovelli's picture
logs, adding of the paths of the elements in the queries and call of the agent
0d3e69a
raw
history blame contribute delete
291 Bytes
import pandas as pd
import tempfile
def save_results_to_csv(results_df : pd.DataFrame):
# Salva i risultati in un file temporaneo e restituisce il path
temp = tempfile.NamedTemporaryFile(delete=False, suffix=".csv")
results_df.to_csv(temp.name, index=False)
return temp.name