Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import stylecloud
|
|
7 |
from PIL import Image
|
8 |
import matplotlib.pyplot as plt
|
9 |
import streamlit as st
|
|
|
10 |
|
11 |
# NLTK kütüphanesinden gerekli bileşenleri indir
|
12 |
nltk.download('stopwords')
|
@@ -64,7 +65,8 @@ if file is not None:
|
|
64 |
language = st.radio("Language", ["tr", "en"])
|
65 |
|
66 |
icon_options = [
|
67 |
-
("fas fa-car", "Araba"),
|
|
|
68 |
("fas fa-star", "Yıldız"),
|
69 |
("fas fa-trophy", "Kupa"),
|
70 |
("fas fa-heart", "Kalp"),
|
@@ -82,8 +84,7 @@ if file is not None:
|
|
82 |
("fas fa-camera", "Kamera"),
|
83 |
("fas fa-crown", "Taç"),
|
84 |
("fas fa-futbol", "Futbol"),
|
85 |
-
("fas fa-gift", "Hediye")
|
86 |
-
("fas fa-star-and-crescent", "Ay Yıldız")
|
87 |
]
|
88 |
|
89 |
icon_labels = [label for _, label in icon_options]
|
@@ -96,3 +97,6 @@ if file is not None:
|
|
96 |
|
97 |
image = Image.open(output_file)
|
98 |
st.image(image, caption='WordCloud', use_column_width=True)
|
|
|
|
|
|
|
|
7 |
from PIL import Image
|
8 |
import matplotlib.pyplot as plt
|
9 |
import streamlit as st
|
10 |
+
import os
|
11 |
|
12 |
# NLTK kütüphanesinden gerekli bileşenleri indir
|
13 |
nltk.download('stopwords')
|
|
|
65 |
language = st.radio("Language", ["tr", "en"])
|
66 |
|
67 |
icon_options = [
|
68 |
+
("fas fa-car", "Araba"),
|
69 |
+
("fas fa-star-and-crescent", "Ay Yıldız"),
|
70 |
("fas fa-star", "Yıldız"),
|
71 |
("fas fa-trophy", "Kupa"),
|
72 |
("fas fa-heart", "Kalp"),
|
|
|
84 |
("fas fa-camera", "Kamera"),
|
85 |
("fas fa-crown", "Taç"),
|
86 |
("fas fa-futbol", "Futbol"),
|
87 |
+
("fas fa-gift", "Hediye")
|
|
|
88 |
]
|
89 |
|
90 |
icon_labels = [label for _, label in icon_options]
|
|
|
97 |
|
98 |
image = Image.open(output_file)
|
99 |
st.image(image, caption='WordCloud', use_column_width=True)
|
100 |
+
# Ensure the file is deleted after display
|
101 |
+
if os.path.exists(output_file):
|
102 |
+
os.remove(output_file)
|