mralamdari's picture
Update app.py
f690396
raw
history blame
468 Bytes
import os
import gradio as gr
from PIL import Image
def image_mod(image):
print(np.sum(image['background']))
img = Image.fromarray(image['composite'])
return img.rotate(45)
title = "Draw to Search"
description = "Using the power of AI to detect the number you draw!"
demo = gr.Interface(
fn=image_mod,
inputs='sketchpad',
outputs='image',
title=title,
description=description,
live=True)
# demo.launch(share=False)
demo.launch(debug=True)