Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,8 @@ from sklearn.cluster import KMeans
|
|
| 7 |
from PIL import Image, ImageDraw, ImageFont
|
| 8 |
import random
|
| 9 |
|
|
|
|
|
|
|
| 10 |
def generate(logo, Vtubername):
|
| 11 |
def extract_dominant_colors(img, num_colors=3, ignore_edges=True):
|
| 12 |
if img.mode == 'RGBA':
|
|
@@ -97,6 +99,7 @@ def generate(logo, Vtubername):
|
|
| 97 |
if response.status_code == 200:
|
| 98 |
image = response.content
|
| 99 |
else:
|
|
|
|
| 100 |
raise Exception(str(response.json()))
|
| 101 |
image = Image.open(io.BytesIO(response.content))
|
| 102 |
title_logo=remove(image)
|
|
@@ -213,7 +216,7 @@ h1{
|
|
| 213 |
}
|
| 214 |
"""
|
| 215 |
|
| 216 |
-
|
| 217 |
|
| 218 |
iface = gr.Interface(
|
| 219 |
theme=gr.themes.Default(primary_hue="pink",font=[gr.themes.GoogleFont("Mochiy Pop One")]),
|
|
|
|
| 7 |
from PIL import Image, ImageDraw, ImageFont
|
| 8 |
import random
|
| 9 |
|
| 10 |
+
import gradio as gr
|
| 11 |
+
|
| 12 |
def generate(logo, Vtubername):
|
| 13 |
def extract_dominant_colors(img, num_colors=3, ignore_edges=True):
|
| 14 |
if img.mode == 'RGBA':
|
|
|
|
| 99 |
if response.status_code == 200:
|
| 100 |
image = response.content
|
| 101 |
else:
|
| 102 |
+
gr.Warning('Your message is not allowed!')
|
| 103 |
raise Exception(str(response.json()))
|
| 104 |
image = Image.open(io.BytesIO(response.content))
|
| 105 |
title_logo=remove(image)
|
|
|
|
| 216 |
}
|
| 217 |
"""
|
| 218 |
|
| 219 |
+
|
| 220 |
|
| 221 |
iface = gr.Interface(
|
| 222 |
theme=gr.themes.Default(primary_hue="pink",font=[gr.themes.GoogleFont("Mochiy Pop One")]),
|