Spaces:
Runtime error
Runtime error
Commit ·
699a269
1
Parent(s): 02983c7
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def get_image_size(image):
|
| 4 |
+
return f"Image size: {image.shape[0]} x {image.shape[1]}"
|
| 5 |
+
|
| 6 |
+
input_image = gr.Image(label="Input Image", scale=1, interactive=True)
|
| 7 |
+
output_text = gr.Textbox(label="Image Size", max_lines=1, show_copy_button=True, interactive=False)
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(fn=get_image_size, inputs=input_image, outputs=output_text, title="Image Size Detector", theme="zenafey/prodia-web")
|
| 10 |
+
iface.launch(show_api=False)
|