naufalnashif
commited on
Commit
β’
321fe57
1
Parent(s):
af06659
Update app.py
Browse files
app.py
CHANGED
@@ -328,6 +328,8 @@ with st.sidebar :
|
|
328 |
if preference_barchart_date == True:
|
329 |
bar = st.selectbox("Pilih Tampilan Bar Chart :", ("Distribusi Kelas", "Distribusi Kelas Berdasarkan Waktu"), index = 0)
|
330 |
target_year = st.selectbox("Pilih Tahun Bar Chart :", df['Date'].str[:4].unique())
|
|
|
|
|
331 |
|
332 |
tab1, tab2, tab3 = st.tabs(["π Documentation", "π Results", "π€΅ Creator"])
|
333 |
|
@@ -352,7 +354,7 @@ with tab2:
|
|
352 |
results = []
|
353 |
analisis = False
|
354 |
if input_option == "Teks Manual" and user_input:
|
355 |
-
if
|
356 |
# Pisahkan teks yang dimasukkan pengguna menjadi baris-baris terpisah
|
357 |
user_texts = user_input.split('\n')
|
358 |
for text in user_texts:
|
@@ -373,10 +375,9 @@ with tab2:
|
|
373 |
analisis = True
|
374 |
|
375 |
elif input_option == "Unggah Berkas XLSX" and uploaded_file is not None:
|
376 |
-
if
|
377 |
results, analisis = all_data_process(texts, df, sentiment_model, tfidf_vectorizer, lookp_dict, stop_words)
|
378 |
|
379 |
-
st.info('Tekan "Analysis" kembali jika tampilan menghilang', icon = 'βΉοΈ')
|
380 |
if results and analisis == True:
|
381 |
df_results = pd.DataFrame(results)
|
382 |
# Membagi tampilan menjadi dua kolom
|
|
|
328 |
if preference_barchart_date == True:
|
329 |
bar = st.selectbox("Pilih Tampilan Bar Chart :", ("Distribusi Kelas", "Distribusi Kelas Berdasarkan Waktu"), index = 0)
|
330 |
target_year = st.selectbox("Pilih Tahun Bar Chart :", df['Date'].str[:4].unique())
|
331 |
+
st.info('Tekan "Analysis" kembali jika tampilan menghilang', icon = 'βΉοΈ')
|
332 |
+
st.button("Analysis")
|
333 |
|
334 |
tab1, tab2, tab3 = st.tabs(["π Documentation", "π Results", "π€΅ Creator"])
|
335 |
|
|
|
354 |
results = []
|
355 |
analisis = False
|
356 |
if input_option == "Teks Manual" and user_input:
|
357 |
+
if button:
|
358 |
# Pisahkan teks yang dimasukkan pengguna menjadi baris-baris terpisah
|
359 |
user_texts = user_input.split('\n')
|
360 |
for text in user_texts:
|
|
|
375 |
analisis = True
|
376 |
|
377 |
elif input_option == "Unggah Berkas XLSX" and uploaded_file is not None:
|
378 |
+
if button:
|
379 |
results, analisis = all_data_process(texts, df, sentiment_model, tfidf_vectorizer, lookp_dict, stop_words)
|
380 |
|
|
|
381 |
if results and analisis == True:
|
382 |
df_results = pd.DataFrame(results)
|
383 |
# Membagi tampilan menjadi dua kolom
|