naufalnashif
commited on
Commit
·
434c3f5
1
Parent(s):
d0ba2db
Update app.py
Browse files
app.py
CHANGED
@@ -85,9 +85,6 @@ def extract_tfidf_features(texts, tfidf_vectorizer):
|
|
85 |
tfidf_model_path = 'X_tfidf_model.joblib'
|
86 |
tfidf_vectorizer = joblib.load(tfidf_model_path)
|
87 |
|
88 |
-
# Tambahkan widget untuk memilih model
|
89 |
-
selected_model = st.selectbox("Pilih Model Sentimen:", ("Ensemble", "Naive Bayes", "Logistic Regression"))
|
90 |
-
|
91 |
# Fungsi untuk memilih model berdasarkan pilihan pengguna
|
92 |
def select_sentiment_model(selected_model):
|
93 |
if selected_model == "Ensemble":
|
@@ -148,6 +145,9 @@ def get_table_download_link(df, download_format):
|
|
148 |
# Judul
|
149 |
st.title("Analisis Sentimen Based on Tweets Biskita Transpakuan")
|
150 |
|
|
|
|
|
|
|
151 |
# Memilih model sentimen berdasarkan pilihan pengguna
|
152 |
sentiment_model = select_sentiment_model(selected_model)
|
153 |
|
|
|
85 |
tfidf_model_path = 'X_tfidf_model.joblib'
|
86 |
tfidf_vectorizer = joblib.load(tfidf_model_path)
|
87 |
|
|
|
|
|
|
|
88 |
# Fungsi untuk memilih model berdasarkan pilihan pengguna
|
89 |
def select_sentiment_model(selected_model):
|
90 |
if selected_model == "Ensemble":
|
|
|
145 |
# Judul
|
146 |
st.title("Analisis Sentimen Based on Tweets Biskita Transpakuan")
|
147 |
|
148 |
+
# Tambahkan widget untuk memilih model
|
149 |
+
selected_model = st.selectbox("Pilih Model Sentimen:", ("Ensemble", "Naive Bayes", "Logistic Regression"))
|
150 |
+
|
151 |
# Memilih model sentimen berdasarkan pilihan pengguna
|
152 |
sentiment_model = select_sentiment_model(selected_model)
|
153 |
|