Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ import streamlit as st
|
|
| 55 |
import stylecloud
|
| 56 |
|
| 57 |
def create_stylecloud(text, language, icon):
|
| 58 |
-
output_file = "
|
| 59 |
|
| 60 |
stylecloud.gen_stylecloud(text=text,
|
| 61 |
icon_name=icon,
|
|
@@ -77,7 +77,7 @@ if file is not None:
|
|
| 77 |
|
| 78 |
if st.button("Create"):
|
| 79 |
output_file = create_stylecloud(text, language, icon)
|
| 80 |
-
st.markdown(f"### [Download
|
| 81 |
|
| 82 |
image = Image.open(output_file)
|
| 83 |
-
st.image(image, caption='
|
|
|
|
| 55 |
import stylecloud
|
| 56 |
|
| 57 |
def create_stylecloud(text, language, icon):
|
| 58 |
+
output_file = "wordcloud.png"
|
| 59 |
|
| 60 |
stylecloud.gen_stylecloud(text=text,
|
| 61 |
icon_name=icon,
|
|
|
|
| 77 |
|
| 78 |
if st.button("Create"):
|
| 79 |
output_file = create_stylecloud(text, language, icon)
|
| 80 |
+
st.markdown(f"### [Download WordCloud](./{output_file})")
|
| 81 |
|
| 82 |
image = Image.open(output_file)
|
| 83 |
+
st.image(image, caption='WordCloud', use_column_width=True)
|