naufalnashif
commited on
Commit
·
4016608
1
Parent(s):
21ca604
Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,9 @@ def extract_tfidf_features(texts, tfidf_vectorizer):
|
|
78 |
tfidf_model_path = 'X_tfidf_model.joblib'
|
79 |
tfidf_vectorizer = joblib.load(tfidf_model_path)
|
80 |
|
|
|
|
|
|
|
81 |
# Fungsi untuk memilih model berdasarkan pilihan pengguna
|
82 |
def select_sentiment_model(selected_model):
|
83 |
if selected_model == "Random Forest":
|
@@ -140,9 +143,6 @@ def get_table_download_link(df, download_format):
|
|
140 |
# Judul
|
141 |
st.title("Aplikasi ML Analisis Sentimen based on data Biskita Transpakuan")
|
142 |
|
143 |
-
# Tambahkan widget untuk memilih model
|
144 |
-
selected_model = st.selectbox("Pilih Model Sentimen:", ("Random Forest", "Ensemble", "Naive Bayes", "Logistic Regression"))
|
145 |
-
|
146 |
# Pilihan input teks manual atau berkas XLSX
|
147 |
input_option = st.radio("Pilih metode input:", ("Teks Manual", "Unggah Berkas XLSX"))
|
148 |
|
|
|
78 |
tfidf_model_path = 'X_tfidf_model.joblib'
|
79 |
tfidf_vectorizer = joblib.load(tfidf_model_path)
|
80 |
|
81 |
+
# Tambahkan widget untuk memilih model
|
82 |
+
selected_model = st.selectbox("Pilih Model Sentimen:", ("Random Forest", "Naive Bayes", "Logistic Regression", "Ensemble"))
|
83 |
+
|
84 |
# Fungsi untuk memilih model berdasarkan pilihan pengguna
|
85 |
def select_sentiment_model(selected_model):
|
86 |
if selected_model == "Random Forest":
|
|
|
143 |
# Judul
|
144 |
st.title("Aplikasi ML Analisis Sentimen based on data Biskita Transpakuan")
|
145 |
|
|
|
|
|
|
|
146 |
# Pilihan input teks manual atau berkas XLSX
|
147 |
input_option = st.radio("Pilih metode input:", ("Teks Manual", "Unggah Berkas XLSX"))
|
148 |
|