Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from distort import apply_wave_effect
|
| 3 |
+
|
| 4 |
+
def distort_image(image):
|
| 5 |
+
return apply_wave_effect(image)
|
| 6 |
+
|
| 7 |
+
demo = gr.Interface(
|
| 8 |
+
fn=distort_image,
|
| 9 |
+
inputs=gr.Image(type="pil"),
|
| 10 |
+
outputs="image",
|
| 11 |
+
title="Paper Wave Distortion",
|
| 12 |
+
description="Upload an image and apply wave-like paper distortion."
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
demo.launch()
|