Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
import torch
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
|
|
|
|
| 5 |
# Define the image generation function
|
| 6 |
def image_generation(prompt):
|
| 7 |
# Check if GPU is available
|
|
|
|
| 2 |
import torch
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
|
| 5 |
+
@st.cache_resource
|
| 6 |
# Define the image generation function
|
| 7 |
def image_generation(prompt):
|
| 8 |
# Check if GPU is available
|