yunuseduran commited on
Commit
34c9ab5
·
verified ·
1 Parent(s): 9d4affc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -8,6 +8,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')
@@ -48,10 +49,7 @@ def preprocess_and_create_stylecloud(file_path, output_name='stylecloud.png',
48
 
49
  def create_stylecloud(text, language, icon):
50
  output_file = "static/stylecloud.png"
51
-
52
- stylecloud.gen_stylecloud(text=text,
53
- icon_name=icon,
54
- output_name=output_file)
55
  # Dosyayı Base64 olarak kodla
56
  with open(output_file, "rb") as file:
57
  data = file.read()
 
8
  import matplotlib.pyplot as plt
9
  import streamlit as st
10
  import os
11
+ import base64
12
 
13
  # NLTK kütüphanesinden gerekli bileşenleri indir
14
  nltk.download('stopwords')
 
49
 
50
  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
  with open(output_file, "rb") as file:
55
  data = file.read()