Spaces:
Sleeping
Sleeping
Bobby commited on
Commit ·
ea266f6
1
Parent(s): 741adc0
yolo
Browse files
app.py
CHANGED
|
@@ -15,6 +15,7 @@ import spaces
|
|
| 15 |
import gc
|
| 16 |
import torch
|
| 17 |
from PIL import Image
|
|
|
|
| 18 |
from diffusers import (
|
| 19 |
ControlNetModel,
|
| 20 |
DPMSolverMultistepScheduler,
|
|
@@ -239,7 +240,9 @@ def apply_style(style_name):
|
|
| 239 |
p = styles.get(style_name, "boho chic")
|
| 240 |
return p
|
| 241 |
|
| 242 |
-
|
|
|
|
|
|
|
| 243 |
css = """
|
| 244 |
h1, h2, h3 {
|
| 245 |
text-align: center;
|
|
|
|
| 15 |
import gc
|
| 16 |
import torch
|
| 17 |
from PIL import Image
|
| 18 |
+
import hashlib
|
| 19 |
from diffusers import (
|
| 20 |
ControlNetModel,
|
| 21 |
DPMSolverMultistepScheduler,
|
|
|
|
| 240 |
p = styles.get(style_name, "boho chic")
|
| 241 |
return p
|
| 242 |
|
| 243 |
+
def image_hash(image):
|
| 244 |
+
return hashlib.md5(image.tobytes()).hexdigest()
|
| 245 |
+
|
| 246 |
css = """
|
| 247 |
h1, h2, h3 {
|
| 248 |
text-align: center;
|