Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,10 +51,10 @@ def create_stylecloud(text, language, icon):
|
|
51 |
output_file = "static/stylecloud.png"
|
52 |
stylecloud.gen_stylecloud(text=text, icon_name=icon, output_name=output_file)
|
53 |
# Dosyayı Base64 olarak kodla
|
54 |
-
|
55 |
data = file.read()
|
56 |
-
|
57 |
-
|
58 |
|
59 |
st.title("WordCloud Creator")
|
60 |
|
|
|
51 |
output_file = "static/stylecloud.png"
|
52 |
stylecloud.gen_stylecloud(text=text, icon_name=icon, output_name=output_file)
|
53 |
# Dosyayı Base64 olarak kodla
|
54 |
+
with open(output_file, "rb") as file:
|
55 |
data = file.read()
|
56 |
+
encoded = base64.b64encode(data).decode()
|
57 |
+
return encoded
|
58 |
|
59 |
st.title("WordCloud Creator")
|
60 |
|