Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def image_mod(image):
|
| 4 |
+
print(image)
|
| 5 |
+
return f"<img src='file={image}'>"
|
| 6 |
+
|
| 7 |
+
with gr.Blocks() as demo:
|
| 8 |
+
img = gr.Image(type='filepath')
|
| 9 |
+
with gr.Row():
|
| 10 |
+
htm1 = gr.HTML()
|
| 11 |
+
gr.Button().click(image_mod,img, [htm1])
|
| 12 |
+
|
| 13 |
+
demo.launch()
|