Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,8 @@ from wordcloud import WordCloud
|
|
| 11 |
import matplotlib.pyplot as plt
|
| 12 |
import pkg_resources
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
# Add Arabic stop words
|
| 17 |
ARABIC_STOP_WORDS = {
|
|
@@ -80,7 +81,7 @@ def create_arabic_wordcloud(text, title):
|
|
| 80 |
width=1200,
|
| 81 |
height=600,
|
| 82 |
background_color='white',
|
| 83 |
-
font_path=
|
| 84 |
max_words=200
|
| 85 |
).generate(text)
|
| 86 |
|
|
|
|
| 11 |
import matplotlib.pyplot as plt
|
| 12 |
import pkg_resources
|
| 13 |
|
| 14 |
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 15 |
+
font_path = os.path.join(current_dir, "ArabicR2013-J25x.tff")
|
| 16 |
|
| 17 |
# Add Arabic stop words
|
| 18 |
ARABIC_STOP_WORDS = {
|
|
|
|
| 81 |
width=1200,
|
| 82 |
height=600,
|
| 83 |
background_color='white',
|
| 84 |
+
font_path=font_path,
|
| 85 |
max_words=200
|
| 86 |
).generate(text)
|
| 87 |
|