Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,15 +4,17 @@ import gradio as gr
|
|
4 |
from diffusers import DiffusionPipeline
|
5 |
|
6 |
def generate_image_and_prompt(prompt: str):
|
7 |
-
# Create an "improved" prompt (simple example)
|
8 |
-
improved_prompt = f"Improved: {prompt}"
|
9 |
|
10 |
-
# Load the DiffusionPipeline
|
11 |
-
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
12 |
-
pipe.load_lora_weights("EvanZhouDev/open-genmoji")
|
13 |
|
14 |
-
# Generate an image from the prompt
|
15 |
-
image = pipe(prompt).images[0]
|
|
|
|
|
16 |
|
17 |
# Return both the improved prompt and the image
|
18 |
return improved_prompt, image, os.getenv("OAUTH_CLIENT_ID")
|
|
|
4 |
from diffusers import DiffusionPipeline
|
5 |
|
6 |
def generate_image_and_prompt(prompt: str):
|
7 |
+
# # Create an "improved" prompt (simple example)
|
8 |
+
# improved_prompt = f"Improved: {prompt}"
|
9 |
|
10 |
+
# # Load the DiffusionPipeline
|
11 |
+
# pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
12 |
+
# pipe.load_lora_weights("EvanZhouDev/open-genmoji")
|
13 |
|
14 |
+
# # Generate an image from the prompt
|
15 |
+
# image = pipe(prompt).images[0]
|
16 |
+
image = null
|
17 |
+
improved_prompt = null
|
18 |
|
19 |
# Return both the improved prompt and the image
|
20 |
return improved_prompt, image, os.getenv("OAUTH_CLIENT_ID")
|