Spaces:
Sleeping
Sleeping
just can pass gradio things, check first
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import replicate
|
|
4 |
DEPLOYMENT_URI = "dd-ds-ai/lora-test-01-deployment-test"
|
5 |
|
6 |
|
7 |
-
def generate_image(
|
8 |
-
deployment = replicate.deployments.get(
|
9 |
prediction = deployment.predictions.create(
|
10 |
input={
|
11 |
"model": "dev",
|
@@ -40,7 +40,7 @@ def create_gradio_interface():
|
|
40 |
# Gradio Interface
|
41 |
interface = gr.Interface(
|
42 |
fn=generate_image, # Die Funktion, die aufgerufen wird
|
43 |
-
inputs=[
|
44 |
outputs=gr.Image(label="Generated Image"), # Ausgabe als Bild
|
45 |
)
|
46 |
|
|
|
4 |
DEPLOYMENT_URI = "dd-ds-ai/lora-test-01-deployment-test"
|
5 |
|
6 |
|
7 |
+
def generate_image(lora_scale, guidance_scale, prompt_strength, num_steps, prompt):
|
8 |
+
deployment = replicate.deployments.get(DEPLOYMENT_URI)
|
9 |
prediction = deployment.predictions.create(
|
10 |
input={
|
11 |
"model": "dev",
|
|
|
40 |
# Gradio Interface
|
41 |
interface = gr.Interface(
|
42 |
fn=generate_image, # Die Funktion, die aufgerufen wird
|
43 |
+
inputs=[lora_scale, guidance_scale, prompt_strength, num_steps, prompt], # Eingaben
|
44 |
outputs=gr.Image(label="Generated Image"), # Ausgabe als Bild
|
45 |
)
|
46 |
|