Spaces:
Configuration error
Configuration error
Delete script.js
Browse files
script.js
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from diffusers import StableDiffusionPipeline
|
3 |
-
import torch
|
4 |
-
|
5 |
-
# Load the model
|
6 |
-
model_id = "runwayml/stable-diffusion-v1-5"
|
7 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
8 |
-
pipe = pipe.to("cuda") # Runs on Hugging Face's GPU servers
|
9 |
-
|
10 |
-
# Streamlit UI
|
11 |
-
st.title("Free AI Image Generator")
|
12 |
-
prompt = st.text_input("Describe your image...")
|
13 |
-
|
14 |
-
if prompt:
|
15 |
-
with st.spinner("Generating..."):
|
16 |
-
image = pipe(prompt).images[0]
|
17 |
-
st.image(image, caption=prompt, use_column_width=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|