Spaces:
Sleeping
Sleeping
naufalnashif
commited on
Commit
•
f30bc43
1
Parent(s):
44464ce
Update app.py
Browse files
app.py
CHANGED
@@ -202,7 +202,7 @@ def remove_stopwords(text, stop_words):
|
|
202 |
|
203 |
def preprocessing_data(hidden_data):
|
204 |
# Initialize results
|
205 |
-
|
206 |
df = pd.DataFrame(hidden_data)
|
207 |
texts = df["judul-berita"]
|
208 |
# Process the text data
|
@@ -211,8 +211,8 @@ def preprocessing_data(hidden_data):
|
|
211 |
norm_slang_text = normalize_slang(cleaned_text, lookp_dict)
|
212 |
tanpa_stopwords = remove_stopwords(norm_slang_text, stop_words)
|
213 |
|
214 |
-
|
215 |
-
return
|
216 |
|
217 |
|
218 |
def eksplorasi_data(selected_options, results, colormap, words):
|
@@ -285,7 +285,7 @@ with st.expander("Preference Settings :"):
|
|
285 |
)
|
286 |
if "Hasil EDA" in selected_options:
|
287 |
colormap = st.selectbox("Pilih Warna Wordclouds :", ["Greys", "Purples", "Blues", "Greens", "Oranges", "Reds", "YlOrBr", "YlOrRd", "OrRd", "PuRd", "RdPu", "BuPu", "GnBu", "PuBu", "YlGnBu", "PuBuGn", "BuGn", "YlGn"])
|
288 |
-
words = st.number_input("Masukkan Jumlah Most Common Words :", min_value = 1, max_value = 15, step = 1, placeholder="Type a number...")
|
289 |
else :
|
290 |
colormap = "Greys"
|
291 |
words = 10
|
|
|
202 |
|
203 |
def preprocessing_data(hidden_data):
|
204 |
# Initialize results
|
205 |
+
results_prep = []
|
206 |
df = pd.DataFrame(hidden_data)
|
207 |
texts = df["judul-berita"]
|
208 |
# Process the text data
|
|
|
211 |
norm_slang_text = normalize_slang(cleaned_text, lookp_dict)
|
212 |
tanpa_stopwords = remove_stopwords(norm_slang_text, stop_words)
|
213 |
|
214 |
+
results_prep.append((text, cleaned_text, norm_slang_text, tanpa_stopwords))
|
215 |
+
return results_prep
|
216 |
|
217 |
|
218 |
def eksplorasi_data(selected_options, results, colormap, words):
|
|
|
285 |
)
|
286 |
if "Hasil EDA" in selected_options:
|
287 |
colormap = st.selectbox("Pilih Warna Wordclouds :", ["Greys", "Purples", "Blues", "Greens", "Oranges", "Reds", "YlOrBr", "YlOrRd", "OrRd", "PuRd", "RdPu", "BuPu", "GnBu", "PuBu", "YlGnBu", "PuBuGn", "BuGn", "YlGn"])
|
288 |
+
words = st.number_input("Masukkan Jumlah Most Common Words :", min_value = 1, max_value = 15, step = 1, value = 10, placeholder="Type a number...")
|
289 |
else :
|
290 |
colormap = "Greys"
|
291 |
words = 10
|