man08man commited on
Commit
3f8a55d
·
verified ·
1 Parent(s): 6417603

Upload 3 files

Browse files
Files changed (3) hide show
  1. index.html +17 -0
  2. script.js +17 -0
  3. style.css +17 -0
index.html ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)
script.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)
style.css ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)