Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,13 @@
|
|
|
|
1 |
import streamlit as st
|
2 |
from diffusers import StableDiffusion3Pipeline
|
3 |
|
4 |
# Load the Diffusion pipeline
|
5 |
pipeline = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)
|
6 |
|
|
|
|
|
|
|
7 |
def generate_prompt(prompt_text):
|
8 |
# Generate response using the Diffusion model
|
9 |
response = pipeline(prompt_text, top_p=0.9, max_length=100)[0]['generated_text']
|
|
|
1 |
+
import torch
|
2 |
import streamlit as st
|
3 |
from diffusers import StableDiffusion3Pipeline
|
4 |
|
5 |
# Load the Diffusion pipeline
|
6 |
pipeline = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16)
|
7 |
|
8 |
+
# Your other functions and main code here...
|
9 |
+
|
10 |
+
|
11 |
def generate_prompt(prompt_text):
|
12 |
# Generate response using the Diffusion model
|
13 |
response = pipeline(prompt_text, top_p=0.9, max_length=100)[0]['generated_text']
|