Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import asyncio
|
2 |
import json
|
3 |
import gradio as gr
|
4 |
-
from diffusers import
|
5 |
from generate_propmts import generate_prompt
|
6 |
|
7 |
-
# Load the model
|
8 |
model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
|
9 |
|
10 |
async def generate_image(prompt, prompt_name):
|
|
|
1 |
import asyncio
|
2 |
import json
|
3 |
import gradio as gr
|
4 |
+
from diffusers import AutoPipelineForText2Image
|
5 |
from generate_propmts import generate_prompt
|
6 |
|
7 |
+
# Load the model once outside of the function
|
8 |
model = AutoPipelineForText2Image.from_pretrained("stabilityai/sdxl-turbo")
|
9 |
|
10 |
async def generate_image(prompt, prompt_name):
|