Spaces:
Sleeping
Sleeping
Comment out code
Browse files
app.py
CHANGED
|
@@ -4,8 +4,8 @@ from PIL import Image
|
|
| 4 |
import base64
|
| 5 |
|
| 6 |
import torch
|
| 7 |
-
|
| 8 |
-
from transformers import pipeline
|
| 9 |
import gradio as gr
|
| 10 |
|
| 11 |
# Set Hugging Face API (needed for gated models)
|
|
@@ -32,7 +32,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 32 |
pipe = pipe.to(device)
|
| 33 |
|
| 34 |
# Text-to-image endpoint
|
| 35 |
-
get_completion = pipeline("text-to-image", model="stabilityai/stable-diffusion-xl-base-1.0")
|
| 36 |
|
| 37 |
# A helper function to convert the PIL image to base64,
|
| 38 |
# so you can send it to the API
|
|
|
|
| 4 |
import base64
|
| 5 |
|
| 6 |
import torch
|
| 7 |
+
from diffusers import StableDiffusionPipeline
|
| 8 |
+
#from transformers import pipeline
|
| 9 |
import gradio as gr
|
| 10 |
|
| 11 |
# Set Hugging Face API (needed for gated models)
|
|
|
|
| 32 |
pipe = pipe.to(device)
|
| 33 |
|
| 34 |
# Text-to-image endpoint
|
| 35 |
+
#get_completion = pipeline("text-to-image", model="stabilityai/stable-diffusion-xl-base-1.0")
|
| 36 |
|
| 37 |
# A helper function to convert the PIL image to base64,
|
| 38 |
# so you can send it to the API
|