Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
-
from diffusers import
|
5 |
from huggingface_hub import InferenceApi
|
6 |
|
7 |
hf_api_key = os.getenv("PRODIGY_GA_02")
|
@@ -16,8 +16,8 @@ response = inference(inputs="Your input text here")
|
|
16 |
print(response)
|
17 |
|
18 |
# Load model
|
19 |
-
model_id = "
|
20 |
-
pipe =
|
21 |
|
22 |
pipe.to("cuda")# If you have GPU access; otherwise, use "cpu"
|
23 |
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
+
from diffusers import DiffusionPipeline
|
5 |
from huggingface_hub import InferenceApi
|
6 |
|
7 |
hf_api_key = os.getenv("PRODIGY_GA_02")
|
|
|
16 |
print(response)
|
17 |
|
18 |
# Load model
|
19 |
+
model_id = "stable-diffusion-v1-5/stable-diffusion-v1-5"
|
20 |
+
pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
|
21 |
|
22 |
pipe.to("cuda")# If you have GPU access; otherwise, use "cpu"
|
23 |
|