app.py
CHANGED
|
@@ -40,14 +40,15 @@ class Pipe:
|
|
| 40 |
clean = output_j[-1][:, 3:, ...]
|
| 41 |
clean=torch.clamp(clean, 0, 1)
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
pipe = Pipe()
|
| 46 |
|
| 47 |
|
| 48 |
@spaces.GPU(duration=120)
|
| 49 |
def predict(img):
|
| 50 |
-
|
|
|
|
| 51 |
demo=gr.Interface(predict, gr.Image(), "image")
|
| 52 |
|
| 53 |
demo.launch()
|
|
|
|
| 40 |
clean = output_j[-1][:, 3:, ...]
|
| 41 |
clean=torch.clamp(clean, 0, 1)
|
| 42 |
|
| 43 |
+
self.output = clean
|
| 44 |
|
| 45 |
pipe = Pipe()
|
| 46 |
|
| 47 |
|
| 48 |
@spaces.GPU(duration=120)
|
| 49 |
def predict(img):
|
| 50 |
+
pipe(img)
|
| 51 |
+
return pipe.output
|
| 52 |
demo=gr.Interface(predict, gr.Image(), "image")
|
| 53 |
|
| 54 |
demo.launch()
|