Update app.py
Browse filesSelect only few relevant columns
app.py
CHANGED
@@ -32,6 +32,8 @@ def f1_tackinfo_getter(country: str)-> str: #it's import to specify the return t
|
|
32 |
A string with information about the given race
|
33 |
"""
|
34 |
df = pd.read_csv('./Formula1_2024season_raceResults.csv')
|
|
|
|
|
35 |
info = str(df.groupby('Track').get_group(country))
|
36 |
client = InferenceClient("meta-llama/Llama-3.2-3B-Instruct")
|
37 |
system_prompt = "You are an expert in F1 race analysis. You will be given data about a race and your goal is to provide a very concise analysis of these results. Your answer should be no more that 5 sentences long"
|
|
|
32 |
A string with information about the given race
|
33 |
"""
|
34 |
df = pd.read_csv('./Formula1_2024season_raceResults.csv')
|
35 |
+
# Select only few relevant columns
|
36 |
+
df = df[['Track', 'Position', 'Driver', 'Team']]
|
37 |
info = str(df.groupby('Track').get_group(country))
|
38 |
client = InferenceClient("meta-llama/Llama-3.2-3B-Instruct")
|
39 |
system_prompt = "You are an expert in F1 race analysis. You will be given data about a race and your goal is to provide a very concise analysis of these results. Your answer should be no more that 5 sentences long"
|