Spaces:
Runtime error
Runtime error
Commit
·
7897fd3
1
Parent(s):
5cf6b7e
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import base64
|
|
6 |
|
7 |
api_url = "https://5cb20b40-572c-426f-9466-995256f9b6eb.id.repl.co/generate_image"
|
8 |
|
9 |
-
def generate_image(model="Dreamlike
|
10 |
data = "?model=" + model + "&prompt=" + prompt + "&seed=" + str(seed) + "&negative_prompt=" + negative_prompt + "&sampler=" + sampler + "&steps=" + str(steps)
|
11 |
response = requests.post(api_url + data, timeout=400)
|
12 |
if response.status_code == 200:
|
@@ -18,7 +18,7 @@ def generate_image(model="Dreamlike Diffusion", prompt="", seed=0, negative_prom
|
|
18 |
return None
|
19 |
|
20 |
inputs = [
|
21 |
-
gr.inputs.Dropdown(['Analog Diffusion', '
|
22 |
gr.inputs.Textbox(label="Prompt"),
|
23 |
gr.inputs.Number(label="Seed", default=0),
|
24 |
gr.inputs.Textbox(label="Negative Prompt", default=""),
|
@@ -28,8 +28,8 @@ inputs = [
|
|
28 |
|
29 |
outputs = gr.outputs.Image(label="Generated Image", type="pil")
|
30 |
|
31 |
-
interface = gr.Interface(generate_image, inputs, outputs, title="
|
32 |
-
description="<center>
|
33 |
examples=[])
|
34 |
|
35 |
interface.launch()
|
|
|
6 |
|
7 |
api_url = "https://5cb20b40-572c-426f-9466-995256f9b6eb.id.repl.co/generate_image"
|
8 |
|
9 |
+
def generate_image(model="Dreamlike Photoreal", prompt="", seed=0, negative_prompt="", sampler="k_dpmpp_2s_a", steps=50):
|
10 |
data = "?model=" + model + "&prompt=" + prompt + "&seed=" + str(seed) + "&negative_prompt=" + negative_prompt + "&sampler=" + sampler + "&steps=" + str(steps)
|
11 |
response = requests.post(api_url + data, timeout=400)
|
12 |
if response.status_code == 200:
|
|
|
18 |
return None
|
19 |
|
20 |
inputs = [
|
21 |
+
gr.inputs.Dropdown(['Analog Diffusion', 'ChilloutMix', 'Dreamlike Photoreal', 'Epic Diffusion', 'Experience', 'FaeTastic', 'Hassanblend', 'NeverEnding Dream', 'ProtoGen', 'RealBiter', 'Realism Engine', 'Realistic Vision', 'Woop-Woop Photo'], label="Model", default="Dreamlike Photoreal"),
|
22 |
gr.inputs.Textbox(label="Prompt"),
|
23 |
gr.inputs.Number(label="Seed", default=0),
|
24 |
gr.inputs.Textbox(label="Negative Prompt", default=""),
|
|
|
28 |
|
29 |
outputs = gr.outputs.Image(label="Generated Image", type="pil")
|
30 |
|
31 |
+
interface = gr.Interface(generate_image, inputs, outputs, title="PhotoGen 3.0",
|
32 |
+
description="<center>The best Realistic Photo Generation Models in one place.</center>",
|
33 |
examples=[])
|
34 |
|
35 |
interface.launch()
|