Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ from PIL import Image
|
|
| 3 |
import numpy as np
|
| 4 |
from transformers import SamModel, SamProcessor
|
| 5 |
from diffusers import AutoPipelineForInpainting
|
|
|
|
| 6 |
import torch
|
| 7 |
|
| 8 |
# Force the model to use CPU
|
|
@@ -58,9 +59,10 @@ def gradio_interface(image, points):
|
|
| 58 |
iface = gr.Interface(
|
| 59 |
fn=gradio_interface,
|
| 60 |
inputs=[
|
| 61 |
-
gr.Image(image_mode='RGB', image_shape
|
| 62 |
"text" # To allow users to enter points manually or through another input method
|
| 63 |
],
|
| 64 |
outputs=["image", "image"]
|
| 65 |
)
|
|
|
|
| 66 |
iface.launch(share=True)
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
from transformers import SamModel, SamProcessor
|
| 5 |
from diffusers import AutoPipelineForInpainting
|
| 6 |
+
from diffusers.models.autoencoders.vq_model import VQEncoderOutput, VQModel
|
| 7 |
import torch
|
| 8 |
|
| 9 |
# Force the model to use CPU
|
|
|
|
| 59 |
iface = gr.Interface(
|
| 60 |
fn=gradio_interface,
|
| 61 |
inputs=[
|
| 62 |
+
gr.Image(image_mode='RGB'), # Removed image_shape parameter
|
| 63 |
"text" # To allow users to enter points manually or through another input method
|
| 64 |
],
|
| 65 |
outputs=["image", "image"]
|
| 66 |
)
|
| 67 |
+
|
| 68 |
iface.launch(share=True)
|