dhanikitkat commited on
Commit
71e4da6
·
1 Parent(s): 5618f88
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -12,6 +12,8 @@ from wordcloud import WordCloud
12
  import numpy as np
13
  from PIL import ImageFont
14
 
 
 
15
 
16
  # Load pipelines
17
  sentiment_pipe = pipeline("text-classification", model="ayameRushia/bert-base-indonesian-1.5G-sentiment-analysis-smsa")
@@ -160,7 +162,7 @@ def process_file(file, slank_formal_df):
160
  st.plotly_chart(fig_emotion, use_container_width=True)
161
 
162
  # Generate word clouds
163
- font_path = 'Poppins-Regular.ttf'
164
 
165
  # Overall word cloud
166
  overall_text = ' '.join(df['Cleaned Content'].dropna())
@@ -208,7 +210,7 @@ def get_word_freq_download_link(word_freq_df):
208
  return href
209
 
210
  def main():
211
- st.title("Aplikasi Analisis Sentimen dan Prediksi Emosi by Ramdhani")
212
 
213
  slank_file = st.file_uploader("Upload file slank (CSV atau TXT)", type=["csv", "txt"])
214
  if slank_file is not None:
 
12
  import numpy as np
13
  from PIL import ImageFont
14
 
15
+ nltk.download('punkt')
16
+
17
 
18
  # Load pipelines
19
  sentiment_pipe = pipeline("text-classification", model="ayameRushia/bert-base-indonesian-1.5G-sentiment-analysis-smsa")
 
162
  st.plotly_chart(fig_emotion, use_container_width=True)
163
 
164
  # Generate word clouds
165
+ font_path = 'assets\Poppins-Regular.ttf'
166
 
167
  # Overall word cloud
168
  overall_text = ' '.join(df['Cleaned Content'].dropna())
 
210
  return href
211
 
212
  def main():
213
+ st.title("Aplikasi Analisis Sentimen dan Prediksi Emosi")
214
 
215
  slank_file = st.file_uploader("Upload file slank (CSV atau TXT)", type=["csv", "txt"])
216
  if slank_file is not None: