Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,9 +5,9 @@ import gradio as gr
|
|
| 5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 6 |
pipeline = DiffusionPipeline.from_pretrained("anusha-bhambore/live-eventful")
|
| 7 |
pipeline = pipeline.to(device)
|
| 8 |
-
def generate_image_interface(prompt, negative_prompt,
|
| 9 |
params = {'prompt': prompt, 'num_inference_steps': num_inference_steps, 'num_images_per_prompt':2, 'height':int(1.2*weight),
|
| 10 |
-
'weight': weight, 'negative_prompt': negative_prompt
|
| 11 |
|
| 12 |
img = pipeline(**params).images
|
| 13 |
return img[0],img[1]
|
|
|
|
| 5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 6 |
pipeline = DiffusionPipeline.from_pretrained("anusha-bhambore/live-eventful")
|
| 7 |
pipeline = pipeline.to(device)
|
| 8 |
+
def generate_image_interface(prompt, negative_prompt, num_inference_steps=50, weight=640):
|
| 9 |
params = {'prompt': prompt, 'num_inference_steps': num_inference_steps, 'num_images_per_prompt':2, 'height':int(1.2*weight),
|
| 10 |
+
'weight': weight, 'negative_prompt': negative_prompt}
|
| 11 |
|
| 12 |
img = pipeline(**params).images
|
| 13 |
return img[0],img[1]
|