|
import streamlit as st
|
|
import joblib
|
|
|
|
|
|
model = joblib.load('team_points_predictor.pkl')
|
|
team_encoder = joblib.load('team_encoder.pkl')
|
|
circuit_encoder = joblib.load('circuit_encoder.pkl')
|
|
|
|
st.title("🏎️ F1 Takım Puan Tahmin Aracı")
|
|
|
|
year = st.slider("Yıl", 1950, 2020, 2010)
|
|
team = st.selectbox("Takım", team_encoder.classes_)
|
|
circuit = st.selectbox("Pist ID", circuit_encoder.classes_)
|
|
|
|
|
|
team_encoded = team_encoder.transform([team])[0]
|
|
circuit_encoded = circuit_encoder.transform([circuit])[0]
|
|
|
|
|
|
input_data = [[year, team_encoded, circuit_encoded]]
|
|
predicted_points = model.predict(input_data)[0]
|
|
|
|
st.success(f"🔮 Tahmini Puan: {predicted_points:.2f}")
|
|
|