miturkoglu96 commited on
Commit
94c8a6c
·
verified ·
1 Parent(s): 32c9194

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -3,14 +3,14 @@ import stylecloud
3
  from PIL import Image
4
  import os
5
 
6
- #fonksiyon tanımla
7
  def create_stylecloud(file,language,icon):
8
  # Dosya yolunu ve içerik türünü belirleyin
9
- #icon kodları ve daha fazlası için ==>> https://fontawesome.com/icons
10
  text=file.decode("utf-8")
11
  output_file='stylecloud.png' # Çıktı dosyasının ismi
12
 
13
- #Kelime bulutunu oluştur
14
  stylecloud.gen_stylecloud(
15
  text=text,
16
  icon_name=icon,
@@ -18,6 +18,13 @@ def create_stylecloud(file,language,icon):
18
  output_name=output_file,
19
  )
20
 
 
 
 
 
 
 
 
21
  #oluşturulan kelime bulutunun dosya adı
22
  return output_file
23
  '''
 
3
  from PIL import Image
4
  import os
5
 
6
+ # Fonksiyon tanımla
7
  def create_stylecloud(file,language,icon):
8
  # Dosya yolunu ve içerik türünü belirleyin
9
+ # İcon kodları ve daha fazlası için ==>> https://fontawesome.com/icons
10
  text=file.decode("utf-8")
11
  output_file='stylecloud.png' # Çıktı dosyasının ismi
12
 
13
+ # Kelime bulutunu oluştur
14
  stylecloud.gen_stylecloud(
15
  text=text,
16
  icon_name=icon,
 
18
  output_name=output_file,
19
  )
20
 
21
+ # Oluşturulan görüntüyü yükle
22
+ image = Image.open(output_file)
23
+ #image = image.resize((300, 300)) # Resmi 300x300 piksele yeniden boyutlandırın
24
+
25
+ # Görüntüyü Getir
26
+ return image
27
+
28
  #oluşturulan kelime bulutunun dosya adı
29
  return output_file
30
  '''