CarstenF commited on
Commit
597af03
·
1 Parent(s): 02cf149

just can pass gradio things, check first

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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(deployment_uri, 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,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=[DEPLOYMENT_URI, lora_scale, guidance_scale, prompt_strength, num_steps, prompt], # Eingaben
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