kambris commited on
Commit
ede97b6
·
verified ·
1 Parent(s): a3bb9b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,6 +9,9 @@ from collections import Counter
9
  import os
10
  from wordcloud import WordCloud
11
  import matplotlib.pyplot as plt
 
 
 
12
  # Add Arabic stop words
13
  ARABIC_STOP_WORDS = {
14
  'في', 'من', 'إلى', 'على', 'عن', 'مع', 'خلال', 'حتى', 'إذا', 'ثم',
@@ -76,7 +79,7 @@ def create_arabic_wordcloud(text, title):
76
  width=1200,
77
  height=600,
78
  background_color='white',
79
- font_path='arial', # Works with system Arabic fonts
80
  max_words=200
81
  ).generate(text)
82
 
 
9
  import os
10
  from wordcloud import WordCloud
11
  import matplotlib.pyplot as plt
12
+
13
+ ARABIC_FONT = "ArabicR2013-J25x.tff"
14
+
15
  # Add Arabic stop words
16
  ARABIC_STOP_WORDS = {
17
  'في', 'من', 'إلى', 'على', 'عن', 'مع', 'خلال', 'حتى', 'إذا', 'ثم',
 
79
  width=1200,
80
  height=600,
81
  background_color='white',
82
+ font_path='arial',
83
  max_words=200
84
  ).generate(text)
85